mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-kernel@vger.kernel.org
Cc: hsweeten@visionengravers.com, abbotti@mev.co.uk
Subject: Re: [PATCH] comedi: don't build module device_ids if built in
Date: Fri, 8 Mar 2024 18:57:15 +0000	[thread overview]
Message-ID: <b6e60c22-8054-4efa-85dc-eb587296fe63@codethink.co.uk> (raw)
In-Reply-To: <20240308185419.1929060-1-ben.dooks@codethink.co.uk>

On 08/03/2024 18:54, Ben Dooks wrote:
> If not building as a module, then the device_ids[] array is not used
> by the  MODULE_DEVICE_TABLE(pnp, device_ids) so remove the warning
> about it not being used by enclosing it in #ifdef MODULE
> 
> Fixes:
> 
> drivers/comedi/drivers/ni_atmio.c:209:35: warning: ‘device_ids’ defined but not used [-Wunused-const-variable=]
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>   drivers/comedi/drivers/ni_atmio.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/comedi/drivers/ni_atmio.c b/drivers/comedi/drivers/ni_atmio.c
> index 8876a1d24c56..f0dbe4c2341a 100644
> --- a/drivers/comedi/drivers/ni_atmio.c
> +++ b/drivers/comedi/drivers/ni_atmio.c
> @@ -206,6 +206,7 @@ static const int ni_irqpin[] = {
>   
>   #include "ni_mio_common.c"
>   
> +#ifndef MODULE

Whoops, this was meant to be fixed to #ifdef.
Will send fixed patch Monday

>   static const struct pnp_device_id device_ids[] = {
>   	{.id = "NIC1900", .driver_data = 0},
>   	{.id = "NIC2400", .driver_data = 0},
> @@ -216,6 +217,7 @@ static const struct pnp_device_id device_ids[] = {
>   };
>   
>   MODULE_DEVICE_TABLE(pnp, device_ids);
> +#endif
>   
>   static int ni_isapnp_find_board(struct pnp_dev **dev)
>   {

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html


      reply	other threads:[~2024-03-08 18:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 18:54 Ben Dooks
2024-03-08 18:57 ` Ben Dooks [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=b6e60c22-8054-4efa-85dc-eb587296fe63@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=abbotti@mev.co.uk \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®