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

Herve Codina herve.codina at bootlin.com
Mon May 19 04:35:22 PDT 2025


Hi Andy,

On Wed, 7 May 2025 18:15:34 +0300
Andy Shevchenko <andriy.shevchenko at linux.intel.com> 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é



More information about the linux-arm-kernel mailing list