[PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used

From: Miles Chen
Date: Thu Apr 14 2022 - 04:11:48 EST


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@xxxxxxxxxxxx>
---
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