public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Dave Penkler <dpenkler@gmail.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Nihar Chaithanya <niharchaithanya@gmail.com>,
	Rohit Chavan <roheetchavan@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpib: mark pnp_device_id tables as __maybe_unused
Date: Wed, 5 Feb 2025 14:28:08 +0100	[thread overview]
Message-ID: <2025020548-tropical-thickness-52a0@gregkh> (raw)
In-Reply-To: <19cc695e-47e6-451a-a443-384e2b423953@app.fastmail.com>

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

      reply	other threads:[~2025-02-05 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 12:12 [PATCH] gpib: mark pnp_device_id tables as __maybe_unused Arnd Bergmann
2025-02-05 12:25 ` Greg Kroah-Hartman
2025-02-05 13:04   ` Arnd Bergmann
2025-02-05 13:28     ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025020548-tropical-thickness-52a0@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dpenkler@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=niharchaithanya@gmail.com \
    --cc=roheetchavan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox