CC: [email protected] CC: [email protected] BCC: [email protected] CC: [email protected] TO: Srinivasa Rao Mandadapu <[email protected]> CC: Mark Brown <[email protected]> CC: Venkata Prasad Potturu <[email protected]> CC: Srinivas Kandagatla <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 4b97bac0756a81cda5afd45417a99b5bccdcff67 commit: b62c4e5fba2f910bc9f23ae152d11627e4c2f00f ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio date: 2 months ago :::::: branch date: 8 hours ago :::::: commit date: 2 months ago config: arm-randconfig-c002-20220506 (https://download.01.org/0day-ci/archive/20220507/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc) 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 # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b62c4e5fba2f910bc9f23ae152d11627e4c2f00f git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout b62c4e5fba2f910bc9f23ae152d11627e4c2f00f # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) drivers/dma/xgene-dma.c:932:7: note: 'len' is not equal to 0 if (len) { ^~~ drivers/dma/xgene-dma.c:932:3: note: Taking true branch if (len) { ^ drivers/dma/xgene-dma.c:933:4: note: Calling 'xgene_dma_prep_xor_desc' xgene_dma_prep_xor_desc(chan, new, &dst[0], src, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma/xgene-dma.c:440:14: note: 'i' is < 'src_cnt' for (i = 0; i < src_cnt; i++) { ^ drivers/dma/xgene-dma.c:440:2: note: Loop condition is true. Entering loop body for (i = 0; i < src_cnt; i++) { ^ drivers/dma/xgene-dma.c:442:29: note: 'i' is equal to 0 xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:442:28: note: '?' condition is true xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:440:14: note: Assuming 'i' is < 'src_cnt' for (i = 0; i < src_cnt; i++) { ^~~~~~~~~~~ drivers/dma/xgene-dma.c:440:2: note: Loop condition is true. Entering loop body for (i = 0; i < src_cnt; i++) { ^ drivers/dma/xgene-dma.c:442:29: note: 'i' is not equal to 0 xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:442:28: note: '?' condition is false xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:440:14: note: Assuming 'i' is < 'src_cnt' for (i = 0; i < src_cnt; i++) { ^~~~~~~~~~~ drivers/dma/xgene-dma.c:440:2: note: Loop condition is true. Entering loop body for (i = 0; i < src_cnt; i++) { ^ drivers/dma/xgene-dma.c:442:29: note: 'i' is not equal to 0 xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:442:28: note: '?' condition is false xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:440:14: note: Assuming 'i' is < 'src_cnt' for (i = 0; i < src_cnt; i++) { ^~~~~~~~~~~ drivers/dma/xgene-dma.c:440:2: note: Loop condition is true. Entering loop body for (i = 0; i < src_cnt; i++) { ^ drivers/dma/xgene-dma.c:442:29: note: 'i' is not equal to 0 xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:442:28: note: '?' condition is false xgene_dma_set_src_buffer((i == 0) ? &desc1->m1 : ^ drivers/dma/xgene-dma.c:445:36: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'int' desc1->m2 |= cpu_to_le64((scf[i] << ((i + 1) * 8))); ^ include/linux/byteorder/generic.h:86:21: note: expanded from macro 'cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^ include/uapi/linux/byteorder/little_endian.h:32:51: note: expanded from macro '__cpu_to_le64' #define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) ^ Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 17 warnings generated. sound/soc/kirkwood/kirkwood-i2s.c:322:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores] value = readl(priv->io + KIRKWOOD_RECCTL); ^ sound/soc/kirkwood/kirkwood-i2s.c:322:2: note: Value stored to 'value' is never read Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. Suppressed 16 warnings (16 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 17 warnings generated. >> sound/soc/qcom/lpass-cdc-dma.c:274:7: warning: Branch condition evaluates to >> a garbage value [clang-analyzer-core.uninitialized.Branch] if (!dmactl) ^~~~~~~ sound/soc/qcom/lpass-cdc-dma.c:261:2: note: 'dmactl' declared without an initial value struct lpaif_dmactl *dmactl; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/qcom/lpass-cdc-dma.c:264:2: note: Control jumps to 'case 3:' at line 272 switch (cmd) { ^ sound/soc/qcom/lpass-cdc-dma.c:273:3: note: Calling '__lpass_get_dmactl_handle' __lpass_get_dmactl_handle(substream, dai, &dmactl, &id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/qcom/lpass-cdc-dma.c:43:2: note: Control jumps to the 'default' case at line 56 switch (dai_id) { ^ sound/soc/qcom/lpass-cdc-dma.c:57:3: note: Left side of '&&' is true dev_err(soc_runtime->dev, "invalid dai id for dma ctl: %d\n", dai_id); ^ include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ sound/soc/qcom/lpass-cdc-dma.c:57:3: note: Taking true branch dev_err(soc_runtime->dev, "invalid dai id for dma ctl: %d\n", dai_id); ^ include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit' if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \ ^ sound/soc/qcom/lpass-cdc-dma.c:57:3: note: '?' condition is true dev_err(soc_runtime->dev, "invalid dai id for dma ctl: %d\n", dai_id); ^ include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:379:12: note: expanded from macro '__printk_index_emit' .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \ ^ sound/soc/qcom/lpass-cdc-dma.c:57:3: note: '?' condition is true dev_err(soc_runtime->dev, "invalid dai id for dma ctl: %d\n", dai_id); ^ include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) ^ include/linux/printk.h:383:14: note: expanded from macro '__printk_index_emit' .level = __builtin_constant_p(_level) ? (_level) : NULL, \ ^ sound/soc/qcom/lpass-cdc-dma.c:57:3: note: Loop condition is false. Exiting loop dev_err(soc_runtime->dev, "invalid dai id for dma ctl: %d\n", dai_id); ^ include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ^ include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap' dev_printk_index_emit(level, fmt); \ ^ include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit' printk_index_subsys_emit("%s %s: ", level, fmt) ^ include/linux/printk.h:413:2: note: expanded from macro 'printk_index_subsys_emit' __printk_index_emit(fmt, level, subsys_fmt_prefix) vim +274 sound/soc/qcom/lpass-cdc-dma.c b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 256 b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 257 static int lpass_cdc_dma_daiops_trigger(struct snd_pcm_substream *substream, b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 258 int cmd, struct snd_soc_dai *dai) b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 259 { b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 260 struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream); b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 261 struct lpaif_dmactl *dmactl; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 262 int ret = 0, id; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 263 b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 264 switch (cmd) { b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 265 case SNDRV_PCM_TRIGGER_START: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 266 case SNDRV_PCM_TRIGGER_RESUME: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 267 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 268 __lpass_platform_codec_intf_init(dai, substream); b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 269 break; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 270 case SNDRV_PCM_TRIGGER_STOP: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 271 case SNDRV_PCM_TRIGGER_SUSPEND: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 272 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 273 __lpass_get_dmactl_handle(substream, dai, &dmactl, &id); b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 @274 if (!dmactl) b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 275 return -EINVAL; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 276 b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 277 ret = regmap_fields_write(dmactl->codec_enable, id, LPAIF_DMACTL_ENABLE_OFF); b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 278 if (ret) { b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 279 dev_err(soc_runtime->dev, b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 280 "error writing to dmactl codec_enable reg: %d\n", ret); b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 281 return ret; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 282 } b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 283 break; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 284 default: b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 285 ret = -EINVAL; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 286 dev_err(soc_runtime->dev, "%s: invalid %d interface\n", __func__, cmd); b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 287 break; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 288 } b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 289 return ret; b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 290 } b81af585ea54ee Srinivasa Rao Mandadapu 2022-02-24 291 :::::: The code at line 274 was first introduced by commit :::::: b81af585ea54ee9f749391e594ee9cbd44061eae ASoC: qcom: Add lpass CPU driver for codec dma control :::::: TO: Srinivasa Rao Mandadapu <[email protected]> :::::: CC: Mark Brown <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
