[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025020548-tropical-thickness-52a0@gregkh>
Date: Wed, 5 Feb 2025 14:28:08 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Arnd Bergmann <arnd@...nel.org>, 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 05, 2025 at 02:04:37PM +0100, Arnd Bergmann wrote:
> 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.
Ah. Then the variable should just be removed as it's obviously not
doing anything :)
(I know it's doing module loading, but that's not ok to just fake it
this way, it should use that table when it is searching the pnp area.)
So a nice "#if 0" carve out for now perhaps?
thanks,
greg k-h
Powered by blists - more mailing lists