Re: [PATCH v5 17/21] ASoC: qdsp6: audioreach: add topology support
From: kernel test robot <hidden>
Date: 2021-09-04 01:05:48
Also in:
alsa-devel, llvm, oe-kbuild-all
Hi Srinivas, I love your patch! Perhaps something to improve: [auto build test WARNING on asoc/for-next] [also build test WARNING on robh/for-next sound/for-next linus/master v5.14 next-20210903] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Srinivas-Kandagatla/ASoC-qcom-Add-AudioReach-support/20210903-192325 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: hexagon-buildonly-randconfig-r002-20210904 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1104e3258b5064e7110cc297e2cec60ac9acfc0a) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/88452a1de12fb46ecf71c3054323a8ed0ed9af21 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Srinivas-Kandagatla/ASoC-qcom-Add-AudioReach-support/20210903-192325 git checkout 88452a1de12fb46ecf71c3054323a8ed0ed9af21 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>):
quoted
sound/soc/qcom/qdsp6/topology.c:1048:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case SND_SOC_AR_TPLG_VOL_CTL:
^~~~~~~~~~~~~~~~~~~~~~~
include/uapi/sound/snd_ar_tokens.h:52:35: note: expanded from macro 'SND_SOC_AR_TPLG_VOL_CTL'
#define SND_SOC_AR_TPLG_VOL_CTL 257
^~~
sound/soc/qcom/qdsp6/topology.c:1060:9: note: uninitialized use occurs here
return ret;
^~~
sound/soc/qcom/qdsp6/topology.c:1034:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +1048 sound/soc/qcom/qdsp6/topology.c
1026
1027 static int audioreach_control_load(struct snd_soc_component *scomp, int index,
1028 struct snd_kcontrol_new *kc,
1029 struct snd_soc_tplg_ctl_hdr *hdr)
1030 {
1031 struct snd_ar_control *scontrol;
1032 struct snd_soc_dobj *dobj;
1033 struct soc_mixer_control *sm;
1034 int ret;
1035
1036 scontrol = kzalloc(sizeof(*scontrol), GFP_KERNEL);
1037 if (!scontrol)
1038 return -ENOMEM;
1039
1040 scontrol->scomp = scomp;
1041
1042 switch (le32_to_cpu(hdr->ops.get)) {
1043 case SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX:
1044 sm = (struct soc_mixer_control *)kc->private_value;
1045 dobj = &sm->dobj;
1046 ret = audioreach_control_load_mix(scomp, scontrol, kc, hdr);
1047 break;1048 case SND_SOC_AR_TPLG_VOL_CTL:
1049 sm = (struct soc_mixer_control *)kc->private_value; 1050 dobj = &sm->dobj; 1051 break; 1052 default: 1053 dev_warn(scomp->dev, "control type not supported %d:%d:%d\n", 1054 hdr->ops.get, hdr->ops.put, hdr->ops.info); 1055 kfree(scontrol); 1056 return -EINVAL; 1057 } 1058 1059 dobj->private = scontrol; 1060 return ret; 1061 } 1062 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Attachments
- .config.gz [application/gzip] 35095 bytes