From: Miles Chen <miles.chen@mediatek.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>
Cc: Miles Chen <miles.chen@mediatek.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
Date: Thu, 14 Apr 2022 16:11:18 +0800 [thread overview]
Message-ID: <20220414081119.30851-1-miles.chen@mediatek.com> (raw)
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)
{
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
next reply other threads:[~2022-04-14 8:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 8:11 Miles Chen [this message]
2022-04-14 8:22 ` [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used Takashi Iwai
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=20220414081119.30851-1-miles.chen@mediatek.com \
--to=miles.chen@mediatek.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=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