[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <19cc695e-47e6-451a-a443-384e2b423953@app.fastmail.com>
Date: Wed, 05 Feb 2025 14:04:37 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Arnd Bergmann" <arnd@...nel.org>
Cc: "Dave Penkler" <dpenkler@...il.com>,
"Dan Carpenter" <dan.carpenter@...aro.org>,
"Nihar Chaithanya" <niharchaithanya@...il.com>,
"Rohit Chavan" <roheetchavan@...il.com>, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpib: mark pnp_device_id tables as __maybe_unused
On Wed, Feb 5, 2025, at 13:25, Greg Kroah-Hartman wrote:
> On Wed, Feb 05, 2025 at 01:12:26PM +0100, Arnd Bergmann wrote:
>>
>> @@ -1390,7 +1390,7 @@ static struct pci_driver tnt4882_pci_driver = {
>> .probe = &tnt4882_pci_probe
>> };
>>
>> -static const struct pnp_device_id tnt4882_pnp_table[] = {
>> +static __maybe_unused const struct pnp_device_id tnt4882_pnp_table[] = {
>
> I see this happening in many different drivers right now, what is so
> unique about pnp that causes this? Shouldn't we fix up the
> MODULE_DEVICE_TABLE() macro to not require stuff like this instead?
I think the other drivers that produce a similar warning usually
have a different bug, they have an incorrect of_match_ptr() or
ACPI_PTR() around the reference to that table, and the correct
fix is usually to just remove those macros. I have previously
sent patches for all of these, and could resend those.
These two pnp drivers are special because they predate the
linux-2.6 driver model and there is no reference to the table
at all in the drivers.
Arnd
Powered by blists - more mailing lists