From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Randolph Ha <rha051117@gmail.com>,
linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Mika Westerberg <westeri@kernel.org>
Subject: Re: [PATCH v1 1/1] i2c: acpi: Replace custom code with device_match_acpi_handle()
Date: Tue, 24 Jun 2025 10:35:59 +0300 [thread overview]
Message-ID: <aFpVX05xv4j4uRiP@smile.fi.intel.com> (raw)
In-Reply-To: <20250624072559.GB2824380@black.fi.intel.com>
On Tue, Jun 24, 2025 at 10:25:59AM +0300, Mika Westerberg wrote:
> On Tue, Jun 24, 2025 at 10:19:02AM +0300, Andy Shevchenko wrote:
> > On Tue, Jun 24, 2025 at 08:45:08AM +0300, Mika Westerberg wrote:
> > > On Mon, Jun 23, 2025 at 04:45:21PM +0300, Andy Shevchenko wrote:
> > > > Since driver core provides a generic device_match_acpi_handle()
> > > > we may replace the custom code with it.
> > >
> > > Well okay but now you replace a simple comparison with a function call. I'm
> > > fine with the patch but I also don't think this is an improvement ;-)
> >
> > The improvement is in using standard API for such cases.
>
> Well ACPI_HANDLE() and comparing handles is also a "standard API".
In some [rare] cases this might lead to removing acpi.h which is a monsteur
that slows down a build and provokes developer to avoid IWYU principle from
enforcement.
> > You may argue on many things that may be open coded in
> > the kernel while we have helpers (in some cases exported)
> > functions that are one-liners or so. Note, the helper also
> > performs an additional check and having an open coded copy
> > may miss such a change. To me it's an improvement.
>
> Which is unnecessary check in this case.
In this perhaps, but my point is that any of such amendments will be applied in
one place for all, while open coding prevents this.
> But like I said, no objections. I just don't think this improves anything.
I think there is an improvement.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-06-24 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 13:45 [PATCH v1 1/1] i2c: acpi: Replace custom code with device_match_acpi_handle() Andy Shevchenko
2025-06-24 5:45 ` Mika Westerberg
2025-06-24 7:19 ` Andy Shevchenko
2025-06-24 7:25 ` Mika Westerberg
2025-06-24 7:35 ` Andy Shevchenko [this message]
2025-06-24 10:18 ` Rafael J. Wysocki
2025-06-24 11:13 ` Andy Shevchenko
2025-06-27 10:22 ` Wolfram Sang
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=aFpVX05xv4j4uRiP@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rha051117@gmail.com \
--cc=westeri@kernel.org \
--cc=wsa+renesas@sang-engineering.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