Re: [PATCH] goldfish: Fix unused const variable 'goldfish_pipe_acpi_match'

From: Andy Shevchenko
Date: Fri Oct 25 2024 - 10:32:29 EST


On Fri, Oct 25, 2024 at 04:27:07PM +0200, Uwe Kleine-König wrote:
> On Fri, Oct 25, 2024 at 03:41:29PM +0800, Zeng Heng wrote:
> > Fix the following compilation warning:
> >
> > drivers/platform/goldfish/goldfish_pipe.c:925:36: warning:
> > ‘goldfish_pipe_acpi_match’ defined but not used
> > [-Wunused-const-variable=]
> > 925 | static const struct acpi_device_id goldfish_pipe_acpi_match[] = {
> >
> > Only define the const variable when the CONFIG_ACPI is enabled.

...

> Looking at changes like
> https://lore.kernel.org/all/20241024130424.3818291-11-andriy.shevchenko@xxxxxxxxxxxxxxx/
> I suggest to drop the use of ACPI_PTR() instead.

Right, please drop ACPI_PTR() and if needed, replace acpi.h with proper
mod_devicetable.h. You may find tons of examples in IIO:
`git log --grep ACPI_PTR -- drivers/iio`.

P.S. Thanks for Cc'ing me!

--
With Best Regards,
Andy Shevchenko