Re: [PATCH v1 1/1] i2c: acpi: Replace custom code with device_match_acpi_handle()
From: Andy Shevchenko
Date: Tue Jun 24 2025 - 03:19:38 EST
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.
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.
--
With Best Regards,
Andy Shevchenko