[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ttlc5ppgljd3plbk6kw4ndi47pqafivtxk2sosdhlw3zeda273@dn74s3eluxqp>
Date: Fri, 25 Oct 2024 16:27:07 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Zeng Heng <zengheng4@...wei.com>
Cc: jia-cheng.hu@...el.com, gregkh@...uxfoundation.org,
quic_jjohnson@...cinc.com, jinqian@...roid.com, alan@...ux.intel.com,
linux-kernel@...r.kernel.org, bobo.shaobowang@...wei.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH] goldfish: Fix unused const variable
'goldfish_pipe_acpi_match'
Hello,
[Cc += Andy]
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.
Note you also need CONFIG_MODULE=n to reproduce.
> Fixes: d62f324b0ac8 ("goldfish: Enable ACPI-based enumeration for android pipe")
> Signed-off-by: Zeng Heng <zengheng4@...wei.com>
> ---
> drivers/platform/goldfish/goldfish_pipe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
> index c2aab0cfab33..aeabacba3760 100644
> --- a/drivers/platform/goldfish/goldfish_pipe.c
> +++ b/drivers/platform/goldfish/goldfish_pipe.c
> @@ -922,11 +922,13 @@ static void goldfish_pipe_remove(struct platform_device *pdev)
> goldfish_pipe_device_deinit(pdev, dev);
> }
>
> +#ifdef CONFIG_ACPI
> static const struct acpi_device_id goldfish_pipe_acpi_match[] = {
> { "GFSH0003", 0 },
> { },
> };
> MODULE_DEVICE_TABLE(acpi, goldfish_pipe_acpi_match);
> +#endif
>
> static const struct of_device_id goldfish_pipe_of_match[] = {
> { .compatible = "google,android-pipe", },
Looking at changes like
https://lore.kernel.org/all/20241024130424.3818291-11-andriy.shevchenko@linux.intel.com/
I suggest to drop the use of ACPI_PTR() instead.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists