[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03cdeacb-918f-7ec7-f7d2-75d86e277872@huawei.com>
Date: Thu, 7 Nov 2024 10:29:13 +0800
From: Zeng Heng <zengheng4@...wei.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC: <quic_jjohnson@...cinc.com>, <jinqian@...roid.com>,
<u.kleine-koenig@...gutronix.de>, <jia-cheng.hu@...el.com>,
<alan@...ux.intel.com>, <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>, <bobo.shaobowang@...wei.com>
Subject: Re: [PATCH v2] goldfish: Fix unused const variable
'goldfish_pipe_acpi_match'
On 2024/11/6 23:57, Andy Shevchenko wrote:
> 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.
Yes, I checked mod_devicetable.h had been already included in
goldfish_pipe_qemu.c before.
After the patch is applied, the header files included in the source file
are as follows:
~~~
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/miscdevice.h>
#include <linux/platform_device.h>
#include <linux/poll.h>
#include <linux/sched.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/mm.h>
#include <linux/bug.h>
#include "goldfish_pipe_qemu.h"
~~~
Best regards,
Zeng Heng
Powered by blists - more mailing lists