Skip to contentSkip to conversation

sound/oss/dmasound: fix 'dmasound_setup' defined but not used

PATCH Applied Miles Chen 3 participants 5 messages Apr 14, 2022 – Apr 22, 2022

Subsystems (2)
lore
Share & tools
lore

Miles Chen

author
#0 lore raw

PATCH v2 1/1 sound/oss/dmasound: fix 'dmasound_setup' defined but not used

We observed: 'dmasound_setup' defined but not used error with COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.

Fix it by adding __maybe_unused to dmasound_setup.

Error(s):
sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]

Fixes 9dd7c46346ca ("sound/oss/dmasound: fix build when drivers are mixed =y/=m")
Cc Takashi Iwai <[email protected]>

---

Change sinve v1:
add fixes tag
use __maybe_unused

---
 sound/oss/dmasound/dmasound_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/oss/dmasound/dmasound_core.c +1 -1
index 9c48f3a9e3d1..164335d3c200 100644
@@ -1428,7 +1428,7 @@ void dmasound_deinit(void)
 		unregister_sound_dsp(sq_unit);
 }
 
-static int dmasound_setup(char *str)
+static int __maybe_unused dmasound_setup(char *str)
 {
 	int ints[6], size;
 
Signature · 1 line
2.18.0
Acked-by on v2 1/1
#1 lore raw
Quoted 12 lines · Miles Chen

We observed: 'dmasound_setup' defined but not used error with COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.

Fix it by adding __maybe_unused to dmasound_setup.

Error(s):
sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]

Fixes 9dd7c46346ca ("sound/oss/dmasound: fix build when drivers are mixed =y/=m")
Cc Takashi Iwai <[email protected]>

Thanks.

Quoted 23 lines

---

Change sinve v1:
add fixes tag
use __maybe_unused

---
 sound/oss/dmasound/dmasound_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/oss/dmasound/dmasound_core.c +1 -1
index 9c48f3a9e3d1..164335d3c200 100644
@@ -1428,7 +1428,7 @@ void dmasound_deinit(void)
 		unregister_sound_dsp(sq_unit);
 }
 
-static int dmasound_setup(char *str)
+static int __maybe_unused dmasound_setup(char *str)
 {
 	int ints[6], size;
 
Signature · 6 lines
~Randy

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Applied
#2 lore raw
In reply to Miles Chen
Quoted 4 lines · Miles Chen

We observed: 'dmasound_setup' defined but not used error with COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.

Quoted 8 lines

Fix it by adding __maybe_unused to dmasound_setup.

Error(s):
sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]

Fixes 9dd7c46346ca ("sound/oss/dmasound: fix build when drivers are mixed =y/=m")
Cc Takashi Iwai <[email protected]>

Thanks, applied.

Takashi

author
#3 lore raw

Hi Taksshi,

Quoted 5 lines
Quoted 5 lines

We observed: 'dmasound_setup' defined but not used error with COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.

Fix it by adding __maybe_unused to dmasound_setup.

Quoted 8 lines
Quoted 6 lines

Error(s):
sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]

Fixes 9dd7c46346ca ("sound/oss/dmasound: fix build when drivers are mixed =y/=m")
Cc Takashi Iwai <[email protected]>

Thanks, applied.

This patch is needed in 5.18-rc3 [1] too, should I submit another patch or you can pick it to the mainstream?

[1] https://lore.kernel.org/lkml/[email protected]/

thanks,
Miles

Quoted 3 lines

Takashi

#4 lore raw
Quoted 11 lines · Miles Chen

Hi Taksshi,

Quoted 8 lines
Quoted 8 lines

We observed: 'dmasound_setup' defined but not used error with COMPILER=gcc ARCH=m68k DEFCONFIG=allmodconfig build.

Fix it by adding __maybe_unused to dmasound_setup.

Error(s):
sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used [-Werror=unused-function]

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Fixes 9dd7c46346ca ("sound/oss/dmasound: fix build when drivers are mixed =y/=m")
Cc Takashi Iwai <[email protected]>

Thanks, applied.

This patch is needed in 5.18-rc3 [1] too, should I submit another patch or you can pick it to the mainstream?

It's included in the branch for the next PR to 5.18.

thanks,

Takashi