Re: [PATCH v2 1/3] driver core: Break infinite loop when deferred probe can't be satisfied

From: Andy Shevchenko
Date: Tue Mar 24 2020 - 11:47:04 EST


On Tue, Mar 24, 2020 at 04:36:56PM +0100, Rafael J. Wysocki wrote:
> On Tue, Mar 24, 2020 at 2:39 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Tue, Mar 24, 2020 at 01:52:00PM +0100, Rafael J. Wysocki wrote:
> > > On Tue, Mar 24, 2020 at 1:20 PM Andy Shevchenko
> > > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

...

> > > > + atomic_dec(&probe_okay);
> > >
> > > Why is this needed?
> >
> > Under successful probe the following is comprehended. When probe of the driver
> > happens it may be discarded (as in above case) as it was initiated by another
> > driver which got deferred.
> >
> > We also discussed this with Peter [1] during his review.
> >
> > [1]: https://lkml.org/lkml/2020/3/12/347
>
> OK, but I would add a comment explaining that to the code.
>
> Also it would be good to explain why probe_okay cannot go below zero
> here in the changelog.

Will do, thank you for review!

--
With Best Regards,
Andy Shevchenko