lkml.org 
[lkml]   [2023]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] ACPI: platform: Ignore SMB0001 only when it has resources
On Mon, Jun 26, 2023 at 02:11:10PM +0200, Rafael J. Wysocki wrote:
> On Mon, Jun 26, 2023 at 12:44 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Jun 26, 2023 at 11:15:19AM +0300, Andy Shevchenko wrote:
> > > On Fri, Jun 23, 2023 at 04:43:55PM +0200, Rafael J. Wysocki wrote:
> > > > On Thu, Jun 22, 2023 at 8:19 PM Andy Shevchenko
> > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > On Thu, Jun 22, 2023 at 05:53:13PM +0200, Rafael J. Wysocki wrote:
> > > > > > On Wed, Jun 21, 2023 at 5:16 PM Andy Shevchenko
> > > > > > <andriy.shevchenko@linux.intel.com> wrote:

...

> > > > BTW, this doesn't need to increment the count even. It could just
> > > > terminate the walk on the first valid resource found and tell the
> > > > caller to return true in that case.
> > >
> > > Indeed, thank you for the hint!
> >
> > Actually it's doesn't matter if we count them or not, we still must use the
> > context of the call to set up a flag or whatever.
>
> No, it is sufficient to pass a pointer to a bool variable.
>
> > With the current code in mind I prefer to count resources and compare that
> > to be non-zero. This will help to read and understand code better.
>
> I'm not sure. The condition is "if there is at least one valid
> resource, skip the device". Counting them all will make casual
> readers wonder why IMO.

Okay, Can you check v3 for the rest and I can send a v4 if nothing else there?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-06-26 15:27    [W:0.032 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site