CC: [email protected] CC: [email protected] BCC: [email protected] CC: [email protected] TO: Jonathan Marek <[email protected]> CC: Mauro Carvalho Chehab <[email protected]> CC: [email protected] CC: Robert Foss <[email protected]> CC: "Bryan O'Donoghue" <[email protected]> CC: Hans Verkuil <[email protected]>
tree: git://linuxtv.org/media_tree.git master head: 2b891d3980f6c255459d0e1c29ce2152ec7cf678 commit: dd89115a7c1cf31223cbeab2430d03bf202c8b22 [20/206] media: camss: csiphy-3ph: don't print HW version as an error :::::: branch date: 7 days ago :::::: commit date: 5 weeks ago config: riscv-randconfig-c006-20220222 (https://download.01.org/0day-ci/archive/20220224/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) 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 riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu git remote add media-tree git://linuxtv.org/media_tree.git git fetch --no-tags media-tree master git checkout dd89115a7c1cf31223cbeab2430d03bf202c8b22 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 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/media/platform/imx-pxp.c:316:6: note: Assuming the condition is true if (pxp_v4l2_pix_fmt_is_yuv(ctx->q_data[V4L2_M2M_SRC].fmt->fourcc) && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/imx-pxp.c:316:6: note: Left side of '&&' is true drivers/media/platform/imx-pxp.c:317:6: note: Assuming the condition is true !pxp_v4l2_pix_fmt_is_yuv(ctx->q_data[V4L2_M2M_DST].fmt->fourcc)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/imx-pxp.c:316:2: note: Taking true branch if (pxp_v4l2_pix_fmt_is_yuv(ctx->q_data[V4L2_M2M_SRC].fmt->fourcc) && ^ drivers/media/platform/imx-pxp.c:336:4: note: The result of the left shift is undefined because the left operand is negative BF_PXP_CSC1_COEF0_UV_OFFSET(-128) | ^ drivers/media/platform/imx-pxp.h:598:8: note: expanded from macro 'BF_PXP_CSC1_COEF0_UV_OFFSET' (((v) << 9) & BM_PXP_CSC1_COEF0_UV_OFFSET) ~~~ ^ Suppressed 6 warnings (6 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. 12 warnings generated. drivers/media/dvb-frontends/cxd2820r_c.c:14:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:14:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:15:34: warning: Value stored to 'c' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct dtv_frontend_properties *c = &fe->dtv_property_cache; ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:15:34: note: Value stored to 'c' during its initialization is never read struct dtv_frontend_properties *c = &fe->dtv_property_cache; ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:92:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:92:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:145:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:145:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:281:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:281:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:299:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_c.c:299:21: note: Value stored to 'client' during its initialization is never read struct i2c_client *client = priv->client[0]; ^~~~~~ ~~~~~~~~~~~~~~~ Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 6 warnings generated. Suppressed 6 warnings (6 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. 10 warnings generated. drivers/media/platform/qcom/camss/camss-csid-170.c:398:3: warning: Value stored to 'val' is never read [clang-analyzer-deadcode.DeadStores] val = 0; ^ ~ drivers/media/platform/qcom/camss/camss-csid-170.c:398:3: note: Value stored to 'val' is never read val = 0; ^ ~ drivers/media/platform/qcom/camss/camss-csid-170.c:478:2: warning: Value stored to 'hw_gen' is never read [clang-analyzer-deadcode.DeadStores] hw_gen = (hw_version >> HW_VERSION_GENERATION) & 0xF; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csid-170.c:478:2: note: Value stored to 'hw_gen' is never read hw_gen = (hw_version >> HW_VERSION_GENERATION) & 0xF; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csid-170.c:479:2: warning: Value stored to 'hw_rev' is never read [clang-analyzer-deadcode.DeadStores] hw_rev = (hw_version >> HW_VERSION_REVISION) & 0xFFF; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csid-170.c:479:2: note: Value stored to 'hw_rev' is never read hw_rev = (hw_version >> HW_VERSION_REVISION) & 0xFFF; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csid-170.c:480:2: warning: Value stored to 'hw_step' is never read [clang-analyzer-deadcode.DeadStores] hw_step = (hw_version >> HW_VERSION_STEPPING) & 0xFFFF; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csid-170.c:480:2: note: Value stored to 'hw_step' is never read hw_step = (hw_version >> HW_VERSION_STEPPING) & 0xFFFF; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 6 warnings (6 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-csiphy-2ph-1-0.c:32:5: warning: Value stored to 'hw_version' during its initialization is never read [clang-analyzer-deadcode.DeadStores] u8 hw_version = readl_relaxed(csiphy->base + ^~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c:32:5: note: Value stored to 'hw_version' during its initialization is never read u8 hw_version = readl_relaxed(csiphy->base + ^~~~~~~~~~ Suppressed 6 warnings (6 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-csiphy-3ph-1-0.c:163:2: warning: >> Value stored to 'hw_version' is never read >> [clang-analyzer-deadcode.DeadStores] hw_version |= readl_relaxed(csiphy->base + ^ drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c:163:2: note: Value stored to 'hw_version' is never read Suppressed 6 warnings (6 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. 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-csiphy.c:781:8: note: Calling 'csiphy_init_formats' ret = csiphy_init_formats(sd, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:545:12: note: 'fh' is null .which = fh ? V4L2_SUBDEV_FORMAT_TRY : ^~ drivers/media/platform/qcom/camss/camss-csiphy.c:545:12: note: '?' condition is false drivers/media/platform/qcom/camss/camss-csiphy.c:554:31: note: 'fh' is null return csiphy_set_format(sd, fh ? fh->state : NULL, &format); ^~ drivers/media/platform/qcom/camss/camss-csiphy.c:554:31: note: '?' condition is false drivers/media/platform/qcom/camss/camss-csiphy.c:554:31: note: Passing null pointer value via 2nd parameter 'sd_state' return csiphy_set_format(sd, fh ? fh->state : NULL, &format); ^~ drivers/media/platform/qcom/camss/camss-csiphy.c:554:9: note: Calling 'csiphy_set_format' return csiphy_set_format(sd, fh ? fh->state : NULL, &format); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:509:6: note: 'format' is not equal to NULL if (format == NULL) ^~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:509:2: note: Taking false branch if (format == NULL) ^ drivers/media/platform/qcom/camss/camss-csiphy.c:517:6: note: Assuming field 'pad' is equal to MSM_CSIPHY_PAD_SINK if (fmt->pad == MSM_CSIPHY_PAD_SINK) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:517:2: note: Taking true branch if (fmt->pad == MSM_CSIPHY_PAD_SINK) { ^ drivers/media/platform/qcom/camss/camss-csiphy.c:518:40: note: Passing null pointer value via 2nd parameter 'sd_state' format = __csiphy_get_format(csiphy, sd_state, ^~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:518:12: note: Calling '__csiphy_get_format' format = __csiphy_get_format(csiphy, sd_state, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:345:6: note: Assuming 'which' is equal to V4L2_SUBDEV_FORMAT_TRY if (which == V4L2_SUBDEV_FORMAT_TRY) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:345:2: note: Taking true branch if (which == V4L2_SUBDEV_FORMAT_TRY) ^ drivers/media/platform/qcom/camss/camss-csiphy.c:346:54: note: Passing null pointer value via 2nd parameter 'state' return v4l2_subdev_get_try_format(&csiphy->subdev, sd_state, ^~~~~~~~ drivers/media/platform/qcom/camss/camss-csiphy.c:346:10: note: Calling 'v4l2_subdev_get_try_format' return v4l2_subdev_get_try_format(&csiphy->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:166:25: note: expanded from macro 'WARN_ON' int __ret_warn_on = !!(condition); \ ^~~~~~~~~ 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 6 warnings (6 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. Suppressed 7 warnings (7 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. 9 warnings generated. drivers/mmc/host/tmio_mmc_core.c:929:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct device *dev = &host->pdev->dev; ^~~ ~~~~~~~~~~~~~~~~ drivers/mmc/host/tmio_mmc_core.c:929:17: note: Value stored to 'dev' during its initialization is never read struct device *dev = &host->pdev->dev; ^~~ ~~~~~~~~~~~~~~~~ Suppressed 8 warnings (7 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. 7 warnings generated. Suppressed 7 warnings (7 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. Suppressed 7 warnings (7 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. Suppressed 7 warnings (7 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. 8 warnings generated. include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult] return 1UL << fls_long(n - 1); ^ drivers/mmc/host/uniphier-sd.c:430:8: note: Loop condition is false. Exiting loop tmp = readl(host->ctl + (CTL_SD_CARD_CLK_CTL << 1)); ^ arch/riscv/include/asm/mmio.h:140:30: note: expanded from macro 'readl' #define readl(c) ({ u32 __v; __io_br(); __v = readl_cpu(c); __io_ar(__v); __v; }) vim +/hw_version +163 drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c 2f8b67195e4839 Robert Foss 2021-03-16 148 4138a88b6093e1 Todor Tomov 2018-07-25 149 static void csiphy_hw_version_read(struct csiphy_device *csiphy, 4138a88b6093e1 Todor Tomov 2018-07-25 150 struct device *dev) 4138a88b6093e1 Todor Tomov 2018-07-25 151 { 4138a88b6093e1 Todor Tomov 2018-07-25 152 u32 hw_version; 4138a88b6093e1 Todor Tomov 2018-07-25 153 4138a88b6093e1 Todor Tomov 2018-07-25 154 writel(CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID, 4138a88b6093e1 Todor Tomov 2018-07-25 155 csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(6)); 4138a88b6093e1 Todor Tomov 2018-07-25 156 4138a88b6093e1 Todor Tomov 2018-07-25 157 hw_version = readl_relaxed(csiphy->base + 4138a88b6093e1 Todor Tomov 2018-07-25 158 CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(12)); 4138a88b6093e1 Todor Tomov 2018-07-25 159 hw_version |= readl_relaxed(csiphy->base + 4138a88b6093e1 Todor Tomov 2018-07-25 160 CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(13)) << 8; 4138a88b6093e1 Todor Tomov 2018-07-25 161 hw_version |= readl_relaxed(csiphy->base + 4138a88b6093e1 Todor Tomov 2018-07-25 162 CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(14)) << 16; 4138a88b6093e1 Todor Tomov 2018-07-25 @163 hw_version |= readl_relaxed(csiphy->base + 4138a88b6093e1 Todor Tomov 2018-07-25 164 CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(15)) << 24; 4138a88b6093e1 Todor Tomov 2018-07-25 165 dd89115a7c1cf3 Jonathan Marek 2021-12-22 166 dev_dbg(dev, "CSIPHY 3PH HW Version = 0x%08x\n", hw_version); 4138a88b6093e1 Todor Tomov 2018-07-25 167 } 4138a88b6093e1 Todor Tomov 2018-07-25 168 :::::: The code at line 163 was first introduced by commit :::::: 4138a88b6093e1f8bf1b8a95c653bec6c854f119 media: camss: csiphy: Add support for 8x96 :::::: TO: Todor Tomov <[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]
