All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: 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]
Date: Fri, 26 Nov 2021 09:07:22 +0800	[thread overview]
Message-ID: <202111260853.hscNWcks-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 28747 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Robert Foss <robert.foss@linaro.org>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Hans Verkuil <hverkuil@xs4all.nl>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8ced7ca3570333998ad2088d5a6275701970e28e
commit: 2fa698e3da84edc6b7a2d670f8bd5035891a744e media: camss: vfe: Decrease priority of of VFE HW version to 'dbg'
date:   8 weeks ago
:::::: branch date: 6 hours ago
:::::: commit date: 8 weeks ago
config: arm-randconfig-c002-20211122 (https://download.01.org/0day-ci/archive/20211126/202111260853.hscNWcks-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c133fb321f7ca6083ce15b6aa5bf89de6600e649)
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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
   drivers/dma/nbpfaxi.c:1339:3: note: Taking false branch
                   if (!irq_res)
                   ^
   drivers/dma/nbpfaxi.c:1342:30: note: Assuming 'irq' is <= field 'end'
                   for (irq = irq_res->start; irq <= irq_res->end;
                                              ^~~~~~~~~~~~~~~~~~~
   drivers/dma/nbpfaxi.c:1342:3: note: Loop condition is true.  Entering loop body
                   for (irq = irq_res->start; irq <= irq_res->end;
                   ^
   drivers/dma/nbpfaxi.c:1342:30: note: Assuming 'irq' is <= field 'end'
                   for (irq = irq_res->start; irq <= irq_res->end;
                                              ^~~~~~~~~~~~~~~~~~~
   drivers/dma/nbpfaxi.c:1342:3: note: Loop condition is true.  Entering loop body
                   for (irq = irq_res->start; irq <= irq_res->end;
                   ^
   drivers/dma/nbpfaxi.c:1342:30: note: Assuming 'irq' is > field 'end'
                   for (irq = irq_res->start; irq <= irq_res->end;
                                              ^~~~~~~~~~~~~~~~~~~
   drivers/dma/nbpfaxi.c:1342:3: note: Loop condition is false. Execution continues on line 1337
                   for (irq = irq_res->start; irq <= irq_res->end;
                   ^
   drivers/dma/nbpfaxi.c:1337:2: note: Loop condition is true.  Entering loop body
           for (i = 0; irqs < ARRAY_SIZE(irqbuf); i++) {
           ^
   drivers/dma/nbpfaxi.c:1339:7: note: Assuming 'irq_res' is null
                   if (!irq_res)
                       ^~~~~~~~
   drivers/dma/nbpfaxi.c:1339:3: note: Taking true branch
                   if (!irq_res)
                   ^
   drivers/dma/nbpfaxi.c:1340:4: note:  Execution continues on line 1353
                           break;
                           ^
   drivers/dma/nbpfaxi.c:1353:6: note: 'irqs' is not equal to 1
           if (irqs != 1 && irqs != 2 && irqs != num_channels + 1)
               ^~~~
   drivers/dma/nbpfaxi.c:1353:6: note: Left side of '&&' is true
   drivers/dma/nbpfaxi.c:1353:19: note: 'irqs' is equal to 2
           if (irqs != 1 && irqs != 2 && irqs != num_channels + 1)
                            ^~~~
   drivers/dma/nbpfaxi.c:1353:29: note: Left side of '&&' is false
           if (irqs != 1 && irqs != 2 && irqs != num_channels + 1)
                                      ^
   drivers/dma/nbpfaxi.c:1356:6: note: 'irqs' is not equal to 1
           if (irqs == 1) {
               ^~~~
   drivers/dma/nbpfaxi.c:1356:2: note: Taking false branch
           if (irqs == 1) {
           ^
   drivers/dma/nbpfaxi.c:1363:7: note: Assuming 'eirq' is >= 0
                   if (eirq < 0)
                       ^~~~~~~~
   drivers/dma/nbpfaxi.c:1363:3: note: Taking false branch
                   if (eirq < 0)
                   ^
   drivers/dma/nbpfaxi.c:1366:7: note: Assuming the condition is true
                   if (irqs == num_channels + 1) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/dma/nbpfaxi.c:1366:3: note: Taking true branch
                   if (irqs == num_channels + 1) {
                   ^
   drivers/dma/nbpfaxi.c:1369:4: note: Loop condition is true.  Entering loop body
                           for (i = 0, chan = nbpf->chan; i <= num_channels;
                           ^
   drivers/dma/nbpfaxi.c:1372:9: note: Assuming the condition is false
                                   if (irqbuf[i] == eirq)
                                       ^~~~~~~~~~~~~~~~~
   drivers/dma/nbpfaxi.c:1372:5: note: Taking false branch
                                   if (irqbuf[i] == eirq)
                                   ^
   drivers/dma/nbpfaxi.c:1369:4: note: Loop condition is true.  Entering loop body
                           for (i = 0, chan = nbpf->chan; i <= num_channels;
                           ^
   drivers/dma/nbpfaxi.c:1372:9: note: Assuming the condition is true
                                   if (irqbuf[i] == eirq)
                                       ^~~~~~~~~~~~~~~~~
   drivers/dma/nbpfaxi.c:1372:5: note: Taking true branch
                                   if (irqbuf[i] == eirq)
                                   ^
   drivers/dma/nbpfaxi.c:1373:6: note: The value 2 is assigned to 'i'
                                           i++;
                                           ^~~
   drivers/dma/nbpfaxi.c:1374:15: note: Assigned value is garbage or undefined
                                   chan->irq = irqbuf[i];
                                             ^ ~~~~~~~~~
   1 warning generated.
   drivers/gpu/drm/panel/panel-elida-kd35t133.c:65:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = ctx->dev;
                          ^~~   ~~~~~~~~
   drivers/gpu/drm/panel/panel-elida-kd35t133.c:65:17: note: Value stored to 'dev' during its initialization is never read
           struct device *dev = ctx->dev;
                          ^~~   ~~~~~~~~
   1 warning generated.
   drivers/gpu/drm/panel/panel-innolux-p079zca.c:459:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
                   err = PTR_ERR(innolux->enable_gpio);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/panel/panel-innolux-p079zca.c:459:3: note: Value stored to 'err' is never read
                   err = PTR_ERR(innolux->enable_gpio);
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 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 1 warnings (1 with check filters).
   1 warning 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;
                   ^~~~~
   1 warning generated.
   drivers/regulator/bcm590xx-regulator.c:140:8: warning: Excessive padding in 'struct bcm590xx_info' (6 padding bytes, where 2 is optimal). 
   Optimal fields order: 
   name, 
   vin_name, 
   volt_table, 
   linear_ranges, 
--
           ^
   fs/overlayfs/export.c:813:6: note: Assuming 'err' is 0
           if (err)
               ^~~
   fs/overlayfs/export.c:813:2: note: Taking false branch
           if (err)
           ^
   fs/overlayfs/export.c:817:12: note: Assuming the condition is false
           dentry = (flags & OVL_FH_FLAG_PATH_UPPER) ?
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/overlayfs/export.c:817:11: note: '?' condition is false
           dentry = (flags & OVL_FH_FLAG_PATH_UPPER) ?
                    ^
   fs/overlayfs/export.c:819:4: note: Calling 'ovl_lower_fh_to_d'
                    ovl_lower_fh_to_d(sb, fh);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   fs/overlayfs/export.c:708:6: note: Assuming 'err' is 0
           if (err)
               ^~~
   fs/overlayfs/export.c:708:2: note: Taking false branch
           if (err)
           ^
   fs/overlayfs/export.c:711:6: note: Left side of '||' is false
           if (!d_is_dir(origin.dentry) ||
               ^
   fs/overlayfs/export.c:712:6: note: Assuming the condition is false
               !(origin.dentry->d_flags & DCACHE_DISCONNECTED)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/overlayfs/export.c:711:2: note: Taking false branch
           if (!d_is_dir(origin.dentry) ||
           ^
   fs/overlayfs/export.c:726:6: note: Assuming field 'indexdir' is null
           if (ofs->indexdir) {
               ^~~~~~~~~~~~~
   fs/overlayfs/export.c:726:2: note: Taking false branch
           if (ofs->indexdir) {
           ^
   fs/overlayfs/export.c:736:6: note: 'index' is null
           if (index && d_is_dir(index)) {
               ^~~~~
   fs/overlayfs/export.c:736:12: note: Left side of '&&' is false
           if (index && d_is_dir(index)) {
                     ^
   fs/overlayfs/export.c:749:2: note: Taking true branch
           if (d_is_dir(origin.dentry)) {
           ^
   fs/overlayfs/export.c:753:7: note: Assuming 'err' is 0
                   if (err)
                       ^~~
   fs/overlayfs/export.c:753:3: note: Taking false branch
                   if (err)
                   ^
   fs/overlayfs/export.c:756:6: note: 'index' is null
           if (index) {
               ^~~~~
   fs/overlayfs/export.c:756:2: note: Taking false branch
           if (index) {
           ^
   fs/overlayfs/export.c:763:11: note: Calling 'ovl_get_dentry'
           dentry = ovl_get_dentry(sb, NULL, &origin, index);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/overlayfs/export.c:654:34: note: 'upper' is null
           const struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer;
                                           ^~~~~
   fs/overlayfs/export.c:654:34: note: '?' condition is false
   fs/overlayfs/export.c:655:24: note: '?' condition is false
           struct dentry *real = upper ?: (index ?: lowerpath->dentry);
                                 ^
   fs/overlayfs/export.c:655:34: note: '?' condition is false
           struct dentry *real = upper ?: (index ?: lowerpath->dentry);
                                           ^
   fs/overlayfs/export.c:655:2: note: 'real' initialized to a null pointer value
           struct dentry *real = upper ?: (index ?: lowerpath->dentry);
           ^~~~~~~~~~~~~~~~~~~
   fs/overlayfs/export.c:661:16: note: Passing null pointer value via 1st parameter 'dentry'
           if (!d_is_dir(real))
                         ^~~~
   fs/overlayfs/export.c:661:7: note: Calling 'd_is_dir'
           if (!d_is_dir(real))
                ^~~~~~~~~~~~~~
   include/linux/dcache.h:420:22: note: Passing null pointer value via 1st parameter 'dentry'
           return d_can_lookup(dentry) || d_is_autodir(dentry);
                               ^~~~~~
   include/linux/dcache.h:420:9: note: Calling 'd_can_lookup'
           return d_can_lookup(dentry) || d_is_autodir(dentry);
                  ^~~~~~~~~~~~~~~~~~~~
   include/linux/dcache.h:410:24: note: Passing null pointer value via 1st parameter 'dentry'
           return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE;
                                 ^~~~~~
   include/linux/dcache.h:410:9: note: Calling '__d_entry_type'
           return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE;
                  ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dcache.h:395:9: note: Access to field 'd_flags' results in a dereference of a null pointer (loaded from variable 'dentry')
           return dentry->d_flags & DCACHE_ENTRY_TYPE;
                  ^~~~~~
   Suppressed 2 warnings (2 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.
   5 warnings generated.
   Suppressed 5 warnings (5 with check filters).
   5 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 1 warnings (1 with check filters).
   1 warning 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;
                   ^~~~~
   3 warnings generated.
   drivers/media/dvb-core/dvb_frontend.c:253:8: warning: Access to field 'eventw' results in a dereference of a null pointer (loaded from variable 'events') [clang-analyzer-core.NullDereference]
           wp = (events->eventw + 1) % MAX_EVENT;
                 ^
   drivers/media/dvb-core/dvb_frontend.c:660:2: note: Taking false branch
           dev_dbg(fe->dvb->device, "%s:\n", __func__);
           ^

vim +/gen +184 drivers/media/platform/qcom/camss/camss-vfe-170.c

7319cdf189bb643 Robert Foss 2021-03-16  179  
7319cdf189bb643 Robert Foss 2021-03-16  180  static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev)
7319cdf189bb643 Robert Foss 2021-03-16  181  {
7319cdf189bb643 Robert Foss 2021-03-16  182  	u32 hw_version = readl_relaxed(vfe->base + VFE_HW_VERSION);
7319cdf189bb643 Robert Foss 2021-03-16  183  
7319cdf189bb643 Robert Foss 2021-03-16 @184  	u32 gen = (hw_version >> 28) & 0xF;
7319cdf189bb643 Robert Foss 2021-03-16 @185  	u32 rev = (hw_version >> 16) & 0xFFF;
7319cdf189bb643 Robert Foss 2021-03-16 @186  	u32 step = hw_version & 0xFFFF;
7319cdf189bb643 Robert Foss 2021-03-16  187  
2fa698e3da84edc Robert Foss 2021-07-26  188  	dev_dbg(dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step);
7319cdf189bb643 Robert Foss 2021-03-16  189  }
7319cdf189bb643 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 <robert.foss@linaro.org>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2021-11-26  1:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26  1:07 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-03 22:12 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] kernel test robot
2022-01-19  8:01 kernel test robot
2022-02-02 18:15 kernel test robot
2022-02-26 19:14 kernel test robot
2022-04-30  6:53 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111260853.hscNWcks-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.