public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Miles Chen <miles.chen@mediatek.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
Date: Thu, 14 Apr 2022 10:22:46 +0200	[thread overview]
Message-ID: <s5hzgko3wh5.wl-tiwai@suse.de> (raw)
In-Reply-To: <20220414081119.30851-1-miles.chen@mediatek.com>

On Thu, 14 Apr 2022 10:11:18 +0200,
Miles Chen wrote:
> 
> We observed: 'dmasound_setup' defined but not used error with
> COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.
> 
> __setup() does not work if MODULE is defined.
> Fix it by warpping dmasound_setup with #ifndef MODULES.
> 
> Error(s):
> sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]
> 
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>

This must be a side-effect of the recent fix 9dd7c46346ca
("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
Adding Randy to Cc.

IMO, a less uglier way would be to add __maybe_unused to that
function.  But it's a matter of taste.


thanks,

Takashi

> ---
>  sound/oss/dmasound/dmasound_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
> index 9c48f3a9e3d1..a1b3e71beadf 100644
> --- a/sound/oss/dmasound/dmasound_core.c
> +++ b/sound/oss/dmasound/dmasound_core.c
> @@ -1428,6 +1428,7 @@ void dmasound_deinit(void)
>  		unregister_sound_dsp(sq_unit);
>  }
>  
> +#ifndef MODULE
>  static int dmasound_setup(char *str)
>  {
>  	int ints[6], size;
> @@ -1470,6 +1471,7 @@ static int dmasound_setup(char *str)
>  }
>  
>  __setup("dmasound=", dmasound_setup);
> +#endif
>  
>      /*
>       *  Conversion tables
> -- 
> 2.18.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-14  8:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14  8:11 [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used Miles Chen
2022-04-14  8:22 ` Takashi Iwai [this message]
2022-04-14  8:37   ` Miles Chen
2022-04-14 11:54 ` AngeloGioacchino Del Regno
2022-04-14 23:39   ` Miles Chen

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=s5hzgko3wh5.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=miles.chen@mediatek.com \
    --cc=perex@perex.cz \
    --cc=rdunlap@infradead.org \
    --cc=tiwai@suse.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