diff mbox series

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

Message ID 20220414091940.2216-1-miles.chen@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [-next,V2] sound/oss/dmasound: fix 'dmasound_setup' defined but not used | expand

Commit Message

Miles Chen April 14, 2022, 9:19 a.m. UTC
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")
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Cc: Takashi Iwai <tiwai@suse.com>

---

Change sinve v1:
 add fixes tag
 use __maybe_unused

---
 sound/oss/dmasound/dmasound_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Randy Dunlap April 15, 2022, 12:01 a.m. UTC | #1
On 4/14/22 02:19, Miles Chen wrote:
> 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")
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
> Cc: Takashi Iwai <tiwai@suse.com>
> 

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
> Change sinve v1:
>  add fixes tag
>  use __maybe_unused
> 
> ---
>  sound/oss/dmasound/dmasound_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
> index 9c48f3a9e3d1..164335d3c200 100644
> --- a/sound/oss/dmasound/dmasound_core.c
> +++ b/sound/oss/dmasound/dmasound_core.c
> @@ -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;
>
Takashi Iwai April 15, 2022, 7:17 a.m. UTC | #2
On Thu, 14 Apr 2022 11:19:38 +0200,
Miles Chen wrote:
> 
> 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")
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
> Cc: Takashi Iwai <tiwai@suse.com>

Thanks, applied.


Takashi
Miles Chen April 22, 2022, 2:53 a.m. UTC | #3
Hi Taksshi,

>> 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")
>> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
>> Cc: Takashi Iwai <tiwai@suse.com>
>
>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/alpine.DEB.2.22.394.2204190925230.302265@ramsan.of.borg/

thanks,
Miles
>
>
>Takashi
Takashi Iwai April 22, 2022, 5:58 a.m. UTC | #4
On Fri, 22 Apr 2022 04:53:12 +0200,
Miles Chen wrote:
> 
> Hi Taksshi,
> 
> >> 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")
> >> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
> >> Cc: Takashi Iwai <tiwai@suse.com>
> >
> >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
diff mbox series

Patch

diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index 9c48f3a9e3d1..164335d3c200 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -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;