All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:11 ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:11 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: Miles Chen, alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:11 ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:11 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: Miles Chen, alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

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-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:11 ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:11 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: Miles Chen, linux-mediatek, alsa-devel, linux-arm-kernel, linux-kernel

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:11 ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:11 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: Miles Chen, alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

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

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
  2022-04-14  8:11 ` Miles Chen
  (?)
  (?)
@ 2022-04-14  8:22   ` Takashi Iwai
  -1 siblings, 0 replies; 20+ messages in thread
From: Takashi Iwai @ 2022-04-14  8:22 UTC (permalink / raw)
  To: Miles Chen
  Cc: Jaroslav Kysela, Takashi Iwai, Matthias Brugger, alsa-devel,
	linux-kernel, linux-arm-kernel, linux-mediatek, Randy Dunlap

On Thu, 14 Apr 2022 10:11:18 +0200,
Miles Chen wrote:
> 
> 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>

This must be a side-effect of the recent fix 9dd7c46346ca
("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
Adding Randy to Cc.

IMO, a less uglier way would be to add __maybe_unused to that
function.  But it's a matter of taste.


thanks,

Takashi

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:22   ` Takashi Iwai
  0 siblings, 0 replies; 20+ messages in thread
From: Takashi Iwai @ 2022-04-14  8:22 UTC (permalink / raw)
  To: Miles Chen
  Cc: Jaroslav Kysela, Takashi Iwai, Matthias Brugger, alsa-devel,
	linux-kernel, linux-arm-kernel, linux-mediatek, Randy Dunlap

On Thu, 14 Apr 2022 10:11:18 +0200,
Miles Chen wrote:
> 
> 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>

This must be a side-effect of the recent fix 9dd7c46346ca
("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
Adding Randy to Cc.

IMO, a less uglier way would be to add __maybe_unused to that
function.  But it's a matter of taste.


thanks,

Takashi

> ---
>  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-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:22   ` Takashi Iwai
  0 siblings, 0 replies; 20+ messages in thread
From: Takashi Iwai @ 2022-04-14  8:22 UTC (permalink / raw)
  To: Miles Chen
  Cc: alsa-devel, Randy Dunlap, linux-kernel, Takashi Iwai,
	linux-mediatek, Matthias Brugger, linux-arm-kernel

On Thu, 14 Apr 2022 10:11:18 +0200,
Miles Chen wrote:
> 
> 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>

This must be a side-effect of the recent fix 9dd7c46346ca
("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
Adding Randy to Cc.

IMO, a less uglier way would be to add __maybe_unused to that
function.  But it's a matter of taste.


thanks,

Takashi

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:22   ` Takashi Iwai
  0 siblings, 0 replies; 20+ messages in thread
From: Takashi Iwai @ 2022-04-14  8:22 UTC (permalink / raw)
  To: Miles Chen
  Cc: Jaroslav Kysela, Takashi Iwai, Matthias Brugger, alsa-devel,
	linux-kernel, linux-arm-kernel, linux-mediatek, Randy Dunlap

On Thu, 14 Apr 2022 10:11:18 +0200,
Miles Chen wrote:
> 
> 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>

This must be a side-effect of the recent fix 9dd7c46346ca
("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
Adding Randy to Cc.

IMO, a less uglier way would be to add __maybe_unused to that
function.  But it's a matter of taste.


thanks,

Takashi

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
  2022-04-14  8:22   ` Takashi Iwai
  (?)
  (?)
@ 2022-04-14  8:37     ` Miles Chen
  -1 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:37 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen, perex, rdunlap, tiwai

Hi Takashi,

> This must be a side-effect of the recent fix 9dd7c46346ca
> ("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
> Adding Randy to Cc.
> 
> IMO, a less uglier way would be to add __maybe_unused to that
> function.  But it's a matter of taste.

thanks, I will use __maybe_unused and the fix tag in v2.

Thanks,
Miles

> 
> 
> thanks,
> 
> Takashi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:37     ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:37 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen, perex, rdunlap, tiwai

Hi Takashi,

> This must be a side-effect of the recent fix 9dd7c46346ca
> ("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
> Adding Randy to Cc.
> 
> IMO, a less uglier way would be to add __maybe_unused to that
> function.  But it's a matter of taste.

thanks, I will use __maybe_unused and the fix tag in v2.

Thanks,
Miles

> 
> 
> thanks,
> 
> Takashi

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:37     ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:37 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, rdunlap, linux-kernel, miles.chen, linux-mediatek,
	matthias.bgg, tiwai, linux-arm-kernel

Hi Takashi,

> This must be a side-effect of the recent fix 9dd7c46346ca
> ("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
> Adding Randy to Cc.
> 
> IMO, a less uglier way would be to add __maybe_unused to that
> function.  But it's a matter of taste.

thanks, I will use __maybe_unused and the fix tag in v2.

Thanks,
Miles

> 
> 
> thanks,
> 
> Takashi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14  8:37     ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14  8:37 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen, perex, rdunlap, tiwai

Hi Takashi,

> This must be a side-effect of the recent fix 9dd7c46346ca
> ("sound/oss/dmasound: fix build when drivers are mixed =y/=m").
> Adding Randy to Cc.
> 
> IMO, a less uglier way would be to add __maybe_unused to that
> function.  But it's a matter of taste.

thanks, I will use __maybe_unused and the fix tag in v2.

Thanks,
Miles

> 
> 
> thanks,
> 
> Takashi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
  2022-04-14  8:11 ` Miles Chen
  (?)
  (?)
@ 2022-04-14 11:54   ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 20+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-14 11:54 UTC (permalink / raw)
  To: Miles Chen, Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14 11:54   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 20+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-14 11:54 UTC (permalink / raw)
  To: Miles Chen, Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: alsa-devel, linux-mediatek, linux-kernel, linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14 11:54   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 20+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-14 11:54 UTC (permalink / raw)
  To: Miles Chen, Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14 11:54   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 20+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-14 11:54 UTC (permalink / raw)
  To: Miles Chen, Jaroslav Kysela, Takashi Iwai, Matthias Brugger
  Cc: alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

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-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
  2022-04-14 11:54   ` AngeloGioacchino Del Regno
  (?)
  (?)
@ 2022-04-14 23:39     ` Miles Chen
  -1 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14 23:39 UTC (permalink / raw)
  To: angelogioacchino.delregno
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen, perex, tiwai

Hi Angelo,

> Hello Miles,
> I agree with Takashi, __maybe_unused looks way better.

No problem, I posted v2 (with __maybe_unused).
https://lore.kernel.org/lkml/20220414091940.2216-1-miles.chen@mediatek.com/

Thanks,
Miles

> 
> Regards,
> Angelo


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14 23:39     ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14 23:39 UTC (permalink / raw)
  To: angelogioacchino.delregno
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen, perex, tiwai

Hi Angelo,

> Hello Miles,
> I agree with Takashi, __maybe_unused looks way better.

No problem, I posted v2 (with __maybe_unused).
https://lore.kernel.org/lkml/20220414091940.2216-1-miles.chen@mediatek.com/

Thanks,
Miles

> 
> Regards,
> Angelo


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14 23:39     ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14 23:39 UTC (permalink / raw)
  To: angelogioacchino.delregno
  Cc: alsa-devel, tiwai, linux-kernel, miles.chen, linux-mediatek,
	matthias.bgg, linux-arm-kernel

Hi Angelo,

> Hello Miles,
> I agree with Takashi, __maybe_unused looks way better.

No problem, I posted v2 (with __maybe_unused).
https://lore.kernel.org/lkml/20220414091940.2216-1-miles.chen@mediatek.com/

Thanks,
Miles

> 
> Regards,
> Angelo


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used
@ 2022-04-14 23:39     ` Miles Chen
  0 siblings, 0 replies; 20+ messages in thread
From: Miles Chen @ 2022-04-14 23:39 UTC (permalink / raw)
  To: angelogioacchino.delregno
  Cc: alsa-devel, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen, perex, tiwai

Hi Angelo,

> Hello Miles,
> I agree with Takashi, __maybe_unused looks way better.

No problem, I posted v2 (with __maybe_unused).
https://lore.kernel.org/lkml/20220414091940.2216-1-miles.chen@mediatek.com/

Thanks,
Miles

> 
> Regards,
> Angelo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-04-14 23:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14  8:11 [PATCH -next] sound/oss/dmasound: fix 'dmasound_setup' defined but not used Miles Chen
2022-04-14  8:11 ` Miles Chen
2022-04-14  8:11 ` Miles Chen
2022-04-14  8:11 ` Miles Chen
2022-04-14  8:22 ` Takashi Iwai
2022-04-14  8:22   ` Takashi Iwai
2022-04-14  8:22   ` Takashi Iwai
2022-04-14  8:22   ` Takashi Iwai
2022-04-14  8:37   ` Miles Chen
2022-04-14  8:37     ` Miles Chen
2022-04-14  8:37     ` Miles Chen
2022-04-14  8:37     ` Miles Chen
2022-04-14 11:54 ` AngeloGioacchino Del Regno
2022-04-14 11:54   ` AngeloGioacchino Del Regno
2022-04-14 11:54   ` AngeloGioacchino Del Regno
2022-04-14 11:54   ` AngeloGioacchino Del Regno
2022-04-14 23:39   ` Miles Chen
2022-04-14 23:39     ` Miles Chen
2022-04-14 23:39     ` Miles Chen
2022-04-14 23:39     ` Miles Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.