[asahilinux:bits/070-audio 63/100] sound/soc/apple/macaudio.c:1016:5: warning: no previous prototype for function 'macaudio_sss_info'

kernel test robot
2023-11-19T14:49:02Z

tree: https://github.com/AsahiLinux/linux bits/070-audio
head: 1c71b1fa2c491cc29c94d29f1a450dba39f27557
commit: 7cc2528565fefec88f55654e9b81e00b2e40130d [63/100] ASoC: macaudio: Add 'Speakers Up Indicator' control
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231119/202311192204.0A4cJo32-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231119/202311192204.0A4cJo32-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311192204.0A4cJo32-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/apple/macaudio.c:1016:5: warning: no previous prototype for function 'macaudio_sss_info' [-Wmissing-prototypes]
int macaudio_sss_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
^
sound/soc/apple/macaudio.c:1016:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int macaudio_sss_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
^
static
>> sound/soc/apple/macaudio.c:1026:5: warning: no previous prototype for function 'macaudio_sss_get' [-Wmissing-prototypes]
int macaudio_sss_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
^
sound/soc/apple/macaudio.c:1026:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int macaudio_sss_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
^
static
2 warnings generated.

vim +/macaudio_sss_info +1016 sound/soc/apple/macaudio.c

1015
> 1016 int macaudio_sss_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1017 {
1018 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1019 uinfo->count = 1;
1020 uinfo->value.integer.min = 0;
1021 uinfo->value.integer.max = 1;
1022
1023 return 0;
1024 }
1025
> 1026 int macaudio_sss_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
1027 {
1028 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
1029 struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
1030
1031 /*
1032 * TODO: Check if any locking is in order here. I would
1033 * assume there is some ALSA-level lock, but DAPM implementations
1034 * of kcontrol ops do explicit locking, so look into it.
1035 */
1036 uvalue->value.integer.value[0] = ma->speakers_streaming;
1037
1038 return 0;
1039 }
1040

--
0-DAY CI Kernel Test Service