Re: [PATCH] ASoC: rt1015: add rt1015 amplifier driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that we have a machine driver based on this rt1015 amplifier, our sparse checks report two minor issues with this driver:

+struct snd_soc_dai_ops rt1015_aif_dai_ops = {
+	.hw_params = rt1015_hw_params,
+	.set_fmt = rt1015_set_dai_fmt,
+};

This structure is not defined so could be static, but doing so shows it's not used either?

+struct snd_soc_dai_driver rt1015_dai[] = {
+	{
+		.name = "rt1015-aif",
+		.id = 0,
+		.playback = {
+			.stream_name = "AIF Playback",
+			.channels_min = 1,
+			.channels_max = 4,
+			.rates = RT1015_STEREO_RATES,
+			.formats = RT1015_FORMATS,
+		},
+	}
+};

This should be declared as static.

see logs below for reference.

 CHECK   sound/soc/codecs/rt1015.c
/soc/codecs/rt1015.c:844:24: warning: symbol 'rt1015_aif_dai_ops' was not declared. Should it be static? sound/soc/codecs/rt1015.c:849:27: warning: symbol 'rt1015_dai' was not declared. Should it be static?

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

Thanks!



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux