Re: [PATCH v2 04/26] driver core: Avoid warning when removing a device while its supplier is unbinding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

On Wed, 7 May 2025 18:15:34 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

...

> 
> >  		if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
> >  			WRITE_ONCE(link->status, DL_STATE_AVAILABLE);
> >  		} else {
> > -			WARN_ON(!(link->flags & DL_FLAG_SYNC_STATE_ONLY));
> > +			if (link->supplier->links.status != DL_DEV_UNBINDING)
> > +				WARN_ON(!(link->flags & DL_FLAG_SYNC_STATE_ONLY));  
> 
> Why not
> 
> 			WARN_ON(link->supplier->links.status != DL_DEV_UNBINDING &&
> 			        !(link->flags & DL_FLAG_SYNC_STATE_ONLY));

Indeed, I will update in that way in the next iteration.

> 
> >  			WRITE_ONCE(link->status, DL_STATE_DORMANT);
> >  		}  
> 

Best regards,
Hervé




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux