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

From: Andy Shevchenko
Date: Wed Nov 06 2024 - 10:58:06 EST


On Sat, Oct 26, 2024 at 03:01:50PM +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[] = {
>
> The complexity of config guards needed for ACPI_PTR() is not worthwhile
> for the small amount of saved data. So remove the use of ACPI_PTR instead
> and drop now unneeded linux/acpi.h include.

...

> #include <linux/io.h>
> #include <linux/dma-mapping.h>
> #include <linux/mm.h>
> -#include <linux/acpi.h>

Because header inclusions are unsorted, it's unclear if there is
mod_devicetable.h included. If not, you should replace acpi.h with
mod_devicetable.h.

> #include <linux/bug.h>
> #include "goldfish_pipe_qemu.h"

Otherwise LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko