From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Andi Shyti <andi.shyti@kernel.org>,
linux-kernel@vger.kernel.org,
Michael Brunner <michael.brunner@kontron.com>,
Robert Moore <robert.moore@intel.com>,
linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org,
acpica-devel@lists.linuxfoundation.org,
Len Brown <lenb@kernel.org>
Subject: Re: [Acpica-devel] [PATCH v2 1/2] ACPI: platform: Ignore SMB0001 only when it has resources
Date: Mon, 26 Jun 2023 16:27:03 +0300 [thread overview]
Message-ID: <ZJmSJ83Hvm+A9pK6@smile.fi.intel.com> (raw)
In-Reply-To: <CAJZ5v0iU5LXcjG8j+S1VZbBmTWGdOdM2W4Yf8HMou2=HQW0-nA@mail.gmail.com>
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
prev parent reply other threads:[~2023-06-26 13:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 15:16 [Acpica-devel] [PATCH v2 1/2] ACPI: platform: Ignore SMB0001 only when it has resources Andy Shevchenko
2023-06-21 15:16 ` [Acpica-devel] [PATCH v2 2/2] ACPI: platform: Move SMB0001 HID to the header and reuse Andy Shevchenko
2023-06-23 5:54 ` Wolfram Sang
2023-06-22 15:53 ` [Acpica-devel] [PATCH v2 1/2] ACPI: platform: Ignore SMB0001 only when it has resources Rafael J. Wysocki
2023-06-22 18:18 ` Andy Shevchenko
2023-06-23 14:44 ` Rafael J. Wysocki
2023-06-26 8:15 ` Andy Shevchenko
2023-06-26 10:44 ` Andy Shevchenko
2023-06-26 12:11 ` Rafael J. Wysocki
2023-06-26 13:27 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZJmSJ83Hvm+A9pK6@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=acpica-devel@lists.linuxfoundation.org \
--cc=andi.shyti@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.brunner@kontron.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).