From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Miles Chen <miles.chen@mediatek.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
Date: Thu, 14 Apr 2022 13:54:27 +0200 [thread overview]
Message-ID: <d7234c71-f5c4-d623-16c4-e16c34b6de35@collabora.com> (raw)
In-Reply-To: <20220414081119.30851-1-miles.chen@mediatek.com>
Il 14/04/22 10:11, Miles Chen ha scritto:
> 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>
> ---
> 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)
Hello Miles,
I agree with Takashi, __maybe_unused looks way better.
Regards,
Angelo
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2022-04-14 11:54 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
2022-04-14 8:37 ` Miles Chen
2022-04-14 11:54 ` AngeloGioacchino Del Regno [this message]
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=d7234c71-f5c4-d623-16c4-e16c34b6de35@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--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=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