[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z78itKfsojtMpr_o@smile.fi.intel.com>
Date: Wed, 26 Feb 2025 16:18:28 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <brgl@...ev.pl>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v1 1/1] at24: Drop of_match_ptr() and ACPI_PTR()
protections
On Tue, Feb 25, 2025 at 06:21:29PM +0100, Krzysztof Kozlowski wrote:
> On 25/02/2025 11:29, Arnd Bergmann wrote:
> > On Tue, Feb 25, 2025, at 11:08, Andy Shevchenko wrote:
> >> These result in a very small reduction in driver size, but at the cost
> >> of more complex build and slightly harder to read code. In the case of
> >> of_match_ptr() it also prevents use of PRP0001 ACPI based identification.
> >> In this particular case we have a valid ACPI/PNP ID that should be used
> >> in preference to PRP0001 but doesn't mean we should prevent that route.
> >>
> >> With this done, drop unneeded of*.h inclusions and __maybe_unused markers.
> >>
> >> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> >
> > Acked-by: Arnd Bergmann <arnd@...db.de>
> >
> > For reference, see below for a couple of patches in this area that
> > I have sent in the past. Ideally I think we should try to fix these
> > all up and enable -Wunused-const-variable, which is useful in its
> > own right.
>
> I tried to fix this in SPI, regulator and ASoC 2 years ago and Mark
> rejected such approach of dropping ACPI/of_match_ptr. AFAIU, Mark wants
> this to be fixed in more generic way, on the OF and ACPI common code,
> not per driver.
>
> SPI:
> https://lore.kernel.org/all/7a65d775-cf07-4393-8b10-2cef4d5266ab@sirena.org.uk/
>
> regulator:
> https://lore.kernel.org/all/20230310214553.275450-1-krzysztof.kozlowski@linaro.org/
>
> ASoC:
> https://lore.kernel.org/all/20230310214333.274903-1-krzysztof.kozlowski@linaro.org/
It was almost two years ago. Things may be changed :-)
At least I have no impediments so far with converting drivers I'm supporting in
the SPI. For ASoC there might be a new attempt by Cezary Rojewski in the future
(he does some cleanups in that area, and we discussed cleaning up ACPI_PTR() at
minimum).
Also note
$ git grep -lw ACPI_PTR | wc -l
238
$ git grep -lw of_match_ptr | wc -l
841
So, at least dropping ACPI_PTR() seems on the track to getting rid of.
And I checked, they are spread all over the kernel with top subsystems as
...
10 drivers/hwtracing/coresight
11 drivers/input/touchscreen
15 drivers/media/i2c
53 sound/soc/codecs
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists