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

Herve Codina
2025-05-19T11:35:29Z

Hi Andy,

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