Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound: oss: fix build warning
Date: Mon, 18 May 2015 10:29:10 +0200	[thread overview]
Message-ID: <s5hfv6u2srt.wl-tiwai@suse.de> (raw)
In-Reply-To: <1431601979-24852-1-git-send-email-sudipm.mukherjee@gmail.com>

At Thu, 14 May 2015 16:42:59 +0530,
Sudip Mukherjee wrote:
> 
> while building with allyesconfig it was giving a build warning about
> unused variable. declare the variable only if the driver is built as a
> module.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Ideally it'd be better to convert to use isapnp_device_id table
directly, but this code is a bit tricky (YMH0021 isn't exposed as a
probe id), so I applied your patch as is.


thanks,

Takashi

> ---
> 
> build tested with allyesconfig and allmodconfig
> 
>  sound/oss/ad1848.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
> index ec1ee07..10c8de1 100644
> --- a/sound/oss/ad1848.c
> +++ b/sound/oss/ad1848.c
> @@ -2860,6 +2860,7 @@ static struct {
>  	{NULL}
>  };
>  
> +#ifdef MODULE
>  static struct isapnp_device_id id_table[] = {
>  	{	ISAPNP_VENDOR('C','M','I'), ISAPNP_DEVICE(0x0001),
>  		ISAPNP_VENDOR('@','@','@'), ISAPNP_FUNCTION(0x0001), 0 },
> @@ -2877,6 +2878,7 @@ static struct isapnp_device_id id_table[] = {
>  };
>  
>  MODULE_DEVICE_TABLE(isapnp, id_table);
> +#endif
>  
>  static struct pnp_dev *activate_dev(char *devname, char *resname, struct pnp_dev *dev)
>  {
> -- 
> 1.8.1.2
> 

      reply	other threads:[~2015-05-18  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 11:12 [PATCH] sound: oss: fix build warning Sudip Mukherjee
2015-05-18  8:29 ` Takashi Iwai [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=s5hfv6u2srt.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sudipm.mukherjee@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