All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ASoc: rt1015: make symbol rt1015_aif_dai_ops and rt1015_dai static
@ 2020-02-03  2:18 Hongbo Yao
  2020-02-04 11:00 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Hongbo Yao @ 2020-02-03  2:18 UTC (permalink / raw)
  To: bardliao, oder_chiou
  Cc: yaohongbo, chenzhou10, lgirdwood, broonie, perex, tiwai, linux-kernel

Fix sparse warning:
sound/soc/codecs/rt1015.c: warning: symbol 'rt1015_aif_dai_ops'
was not declared. Should it be static?
sound/soc/codecs/rt1015.c: warning: symbol 'rt1015_dai' was not
declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
 sound/soc/codecs/rt1015.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index 6d490e2dbc25..de8f75d7cf5a 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -841,12 +841,12 @@ static void rt1015_remove(struct snd_soc_component *component)
 #define RT1015_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
 
-struct snd_soc_dai_ops rt1015_aif_dai_ops = {
+static struct snd_soc_dai_ops rt1015_aif_dai_ops = {
 	.hw_params = rt1015_hw_params,
 	.set_fmt = rt1015_set_dai_fmt,
 };
 
-struct snd_soc_dai_driver rt1015_dai[] = {
+static struct snd_soc_dai_driver rt1015_dai[] = {
 	{
 		.name = "rt1015-aif",
 		.id = 0,
-- 
2.20.1


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

* Re: [PATCH -next] ASoc: rt1015: make symbol rt1015_aif_dai_ops and rt1015_dai static
  2020-02-03  2:18 [PATCH -next] ASoc: rt1015: make symbol rt1015_aif_dai_ops and rt1015_dai static Hongbo Yao
@ 2020-02-04 11:00 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-02-04 11:00 UTC (permalink / raw)
  To: Hongbo Yao
  Cc: bardliao, oder_chiou, chenzhou10, lgirdwood, perex, tiwai, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

On Mon, Feb 03, 2020 at 10:18:41AM +0800, Hongbo Yao wrote:
> Fix sparse warning:
> sound/soc/codecs/rt1015.c: warning: symbol 'rt1015_aif_dai_ops'
> was not declared. Should it be static?
> sound/soc/codecs/rt1015.c: warning: symbol 'rt1015_dai' was not
> declared. Should it be static?

This introduces other warnings so clearly isn't the best fix:

  CC      sound/soc/codecs/rt1015.o
sound/soc/codecs/rt1015.c:844:31: warning: ‘rt1015_aif_dai_ops’ defined but not used [-Wunused-variable]
 static struct snd_soc_dai_ops rt1015_aif_dai_ops = {
                               ^~~~~~~~~~~~~~~~~~


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2020-02-04 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03  2:18 [PATCH -next] ASoc: rt1015: make symbol rt1015_aif_dai_ops and rt1015_dai static Hongbo Yao
2020-02-04 11:00 ` Mark Brown

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.