CC: [email protected] CC: [email protected] CC: [email protected] TO: Robert Foss <[email protected]> CC: Mauro Carvalho Chehab <[email protected]> CC: [email protected] CC: Hans Verkuil <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 9f7fb8de5d9bac17b6392a14af40baf555d9129b commit: 2fa698e3da84edc6b7a2d670f8bd5035891a744e media: camss: vfe: Decrease priority of of VFE HW version to 'dbg' date: 4 months ago :::::: branch date: 22 hours ago :::::: commit date: 4 months ago config: arm-randconfig-c002-20220130 (https://download.01.org/0day-ci/archive/20220203/[email protected]/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 33b45ee44b1f32ffdbc995e6fec806271b4b3ba4) 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=2fa698e3da84edc6b7a2d670f8bd5035891a744e git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 2fa698e3da84edc6b7a2d670f8bd5035891a744e # save the config file to linux build tree 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/scsi/smartpqi/smartpqi_init.c:1519:3: note: Control jumps to line 1541 goto out; ^ drivers/scsi/smartpqi/smartpqi_init.c:1543:2: note: Returning value (loaded from 'rc'), which participates in a condition later return rc; ^~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:1556:8: note: Returning from 'pqi_get_logical_device_info' rc = pqi_get_logical_device_info(ctrl_info, device); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:1560:2: note: Returning value (loaded from 'rc'), which participates in a condition later return rc; ^~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:2270:8: note: Returning from 'pqi_get_device_info' rc = pqi_get_device_info(ctrl_info, device, id_phys); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:2271:7: note: Assuming the condition is false if (rc == -ENOMEM) { ^~~~~~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:2271:3: note: Taking false branch if (rc == -ENOMEM) { ^ drivers/scsi/smartpqi/smartpqi_init.c:2276:7: note: 'rc' is not equal to 0 if (rc) { ^~ drivers/scsi/smartpqi/smartpqi_init.c:2276:3: note: Taking true branch if (rc) { ^ drivers/scsi/smartpqi/smartpqi_init.c:2277:8: note: Assuming field 'is_physical_device' is not equal to 0 if (device->is_physical_device) ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:2277:4: note: Taking true branch if (device->is_physical_device) ^ drivers/scsi/smartpqi/smartpqi_init.c:2278:5: note: Loop condition is false. Exiting loop dev_warn(&ctrl_info->pci_dev->dev, ^ include/linux/dev_printk.h:146:2: note: expanded from macro 'dev_warn' dev_printk_index_wrap(_dev_warn, KERN_WARNING, 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:392:34: note: expanded from macro '__printk_index_emit' #define __printk_index_emit(...) do {} while (0) ^ drivers/scsi/smartpqi/smartpqi_init.c:2280:25: note: Passing null pointer value via 1st parameter 'p' get_unaligned_be64(&phys_lun_ext_entry->wwid)); ^ include/linux/dev_printk.h:146:70: note: expanded from macro 'dev_warn' dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ drivers/scsi/smartpqi/smartpqi_init.c:2280:6: note: Calling 'get_unaligned_be64' get_unaligned_be64(&phys_lun_ext_entry->wwid)); ^ include/linux/dev_printk.h:146:70: note: expanded from macro 'dev_warn' dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/asm-generic/unaligned.h:67:21: note: '__pptr' initialized to a null pointer value return be64_to_cpu(__get_unaligned_t(__be64, p)); ^ include/asm-generic/unaligned.h:13:37: note: expanded from macro '__get_unaligned_t' const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ ^~~~~~ include/uapi/linux/byteorder/little_endian.h:38:59: note: expanded from macro '__be64_to_cpu' #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) ^ include/uapi/linux/swab.h:128:54: note: expanded from macro '__swab64' #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x)) ^ include/asm-generic/unaligned.h:67:21: note: Access to field 'x' results in a dereference of a null pointer (loaded from variable '__pptr') return be64_to_cpu(__get_unaligned_t(__be64, p)); ^ include/asm-generic/unaligned.h:14:2: note: expanded from macro '__get_unaligned_t' __pptr->x; \ ^~~~~~ include/uapi/linux/byteorder/little_endian.h:38:59: note: expanded from macro '__be64_to_cpu' #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) ^ include/uapi/linux/swab.h:128:54: note: expanded from macro '__swab64' #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x)) ^ 1 warning generated. Suppressed 1 warnings (1 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. 1 warning generated. Suppressed 1 warnings (1 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. 7 warnings generated. >> drivers/media/platform/qcom/camss/camss-vfe-170.c:184:6: warning: Value >> stored to 'gen' during its initialization is never read >> [clang-analyzer-deadcode.DeadStores] u32 gen = (hw_version >> 28) & 0xF; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe-170.c:184:6: note: Value stored to 'gen' during its initialization is never read u32 gen = (hw_version >> 28) & 0xF; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/media/platform/qcom/camss/camss-vfe-170.c:185:6: warning: Value >> stored to 'rev' during its initialization is never read >> [clang-analyzer-deadcode.DeadStores] u32 rev = (hw_version >> 16) & 0xFFF; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe-170.c:185:6: note: Value stored to 'rev' during its initialization is never read u32 rev = (hw_version >> 16) & 0xFFF; ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/media/platform/qcom/camss/camss-vfe-170.c:186:6: warning: Value >> stored to 'step' during its initialization is never read >> [clang-analyzer-deadcode.DeadStores] u32 step = hw_version & 0xFFFF; ^~~~ ~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe-170.c:186:6: note: Value stored to 'step' during its initialization is never read u32 step = hw_version & 0xFFFF; ^~~~ ~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe-170.c:336:6: warning: Value stored to 'violation' during its initialization is never read [clang-analyzer-deadcode.DeadStores] u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS); ^~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe-170.c:336:6: note: Value stored to 'violation' during its initialization is never read u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS); ^~~~~~~~~ Suppressed 3 warnings (1 in non-user code, 2 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2 warnings generated. Suppressed 2 warnings (1 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. include/media/v4l2-subdev.h:1000:10: warning: Access to field 'pads' results in a dereference of a null pointer (loaded from variable 'state') [clang-analyzer-core.NullDereference] return &state->pads[pad].try_fmt; ^ drivers/media/platform/qcom/camss/camss-vfe.c:1531:14: note: Assuming 'i' is < field 'line_num' for (i = 0; i < vfe->line_num; i++) { ^~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:1531:2: note: Loop condition is true. Entering loop body for (i = 0; i < vfe->line_num; i++) { ^ drivers/media/platform/qcom/camss/camss-vfe.c:1541:7: note: 'i' is not equal to VFE_LINE_PIX if (i == VFE_LINE_PIX) ^ drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: Taking false branch if (i == VFE_LINE_PIX) ^ drivers/media/platform/qcom/camss/camss-vfe.c:1550:9: note: Calling 'vfe_init_formats' ret = vfe_init_formats(sd, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:1256:12: note: 'fh' is null .which = fh ? V4L2_SUBDEV_FORMAT_TRY : ^~ drivers/media/platform/qcom/camss/camss-vfe.c:1256:12: note: '?' condition is false drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: 'fh' is null return vfe_set_format(sd, fh ? fh->state : NULL, &format); ^~ drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: '?' condition is false drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: Passing null pointer value via 2nd parameter 'sd_state' return vfe_set_format(sd, fh ? fh->state : NULL, &format); ^~ drivers/media/platform/qcom/camss/camss-vfe.c:1265:9: note: Calling 'vfe_set_format' return vfe_set_format(sd, fh ? fh->state : NULL, &format); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:1074:6: note: 'format' is not equal to NULL if (format == NULL) ^~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:1074:2: note: Taking false branch if (format == NULL) ^ drivers/media/platform/qcom/camss/camss-vfe.c:1080:6: note: Assuming field 'pad' is equal to MSM_VFE_PAD_SINK if (fmt->pad == MSM_VFE_PAD_SINK) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:1080:2: note: Taking true branch if (fmt->pad == MSM_VFE_PAD_SINK) { ^ drivers/media/platform/qcom/camss/camss-vfe.c:1085:35: note: Passing null pointer value via 2nd parameter 'sd_state' format = __vfe_get_format(line, sd_state, MSM_VFE_PAD_SRC, ^~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:1085:12: note: Calling '__vfe_get_format' format = __vfe_get_format(line, sd_state, MSM_VFE_PAD_SRC, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:768:6: note: Assuming 'which' is equal to V4L2_SUBDEV_FORMAT_TRY if (which == V4L2_SUBDEV_FORMAT_TRY) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:768:2: note: Taking true branch if (which == V4L2_SUBDEV_FORMAT_TRY) ^ drivers/media/platform/qcom/camss/camss-vfe.c:769:52: note: Passing null pointer value via 2nd parameter 'state' return v4l2_subdev_get_try_format(&line->subdev, sd_state, ^~~~~~~~ drivers/media/platform/qcom/camss/camss-vfe.c:769:10: note: Calling 'v4l2_subdev_get_try_format' return v4l2_subdev_get_try_format(&line->subdev, sd_state, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h:998:14: note: Assuming 'pad' is < field 'num_pads' if (WARN_ON(pad >= sd->entity.num_pads)) ^ include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ include/media/v4l2-subdev.h:998:6: note: Taking false branch if (WARN_ON(pad >= sd->entity.num_pads)) ^ include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON' if (unlikely(__ret_warn_on)) \ ^ include/media/v4l2-subdev.h:998:2: note: Taking false branch if (WARN_ON(pad >= sd->entity.num_pads)) ^ include/media/v4l2-subdev.h:1000:10: note: Access to field 'pads' results in a dereference of a null pointer (loaded from variable 'state') return &state->pads[pad].try_fmt; ^~~~~ Suppressed 2 warnings (1 in non-user code, 1 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. vim +/gen +184 drivers/media/platform/qcom/camss/camss-vfe-170.c 7319cdf189bb64 Robert Foss 2021-03-16 179 7319cdf189bb64 Robert Foss 2021-03-16 180 static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) 7319cdf189bb64 Robert Foss 2021-03-16 181 { 7319cdf189bb64 Robert Foss 2021-03-16 182 u32 hw_version = readl_relaxed(vfe->base + VFE_HW_VERSION); 7319cdf189bb64 Robert Foss 2021-03-16 183 7319cdf189bb64 Robert Foss 2021-03-16 @184 u32 gen = (hw_version >> 28) & 0xF; 7319cdf189bb64 Robert Foss 2021-03-16 @185 u32 rev = (hw_version >> 16) & 0xFFF; 7319cdf189bb64 Robert Foss 2021-03-16 @186 u32 step = hw_version & 0xFFFF; 7319cdf189bb64 Robert Foss 2021-03-16 187 2fa698e3da84ed Robert Foss 2021-07-26 188 dev_dbg(dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step); 7319cdf189bb64 Robert Foss 2021-03-16 189 } 7319cdf189bb64 Robert Foss 2021-03-16 190 :::::: The code at line 184 was first introduced by commit :::::: 7319cdf189bb643c6d56e5898ef89ad7c3ef6c31 media: camss: Add support for VFE hardware version Titan 170 :::::: TO: Robert Foss <[email protected]> :::::: CC: Mauro Carvalho Chehab <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
