CC: [email protected]
CC: [email protected]
BCC: [email protected]
CC: Linux Memory Management List <[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:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   44948bd49d878dad6c9707e34f4a06df73c3a800
commit: dd89115a7c1cf31223cbeab2430d03bf202c8b22 [886/8646] media: camss: 
csiphy-3ph: don't print HW version as an error
:::::: branch date: 23 hours ago
:::::: commit date: 5 weeks ago
config: riscv-randconfig-c006-20220223 
(https://download.01.org/0day-ci/archive/20220226/[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
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=dd89115a7c1cf31223cbeab2430d03bf202c8b22
        git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next 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/hwtracing/intel_th/core.c:317:7: note: 'val' is 0
                   if (val)
                       ^~~
   drivers/hwtracing/intel_th/core.c:317:3: note: Taking false branch
                   if (val)
                   ^
   drivers/hwtracing/intel_th/core.c:320:4: note: Calling 
'intel_th_output_deactivate'
                           intel_th_output_deactivate(thdev);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hwtracing/intel_th/core.c:279:3: note: Assuming field 'driver' is 
non-null
                   to_intel_th_driver_or_null(thdev->dev.driver);
                   ^
   drivers/hwtracing/intel_th/intel_th.h:195:3: note: expanded from macro 
'to_intel_th_driver_or_null'
           ((_d) ? to_intel_th_driver(_d) : NULL)
            ^~~~
   drivers/hwtracing/intel_th/core.c:279:3: note: '?' condition is true
                   to_intel_th_driver_or_null(thdev->dev.driver);
                   ^
   drivers/hwtracing/intel_th/intel_th.h:195:3: note: expanded from macro 
'to_intel_th_driver_or_null'
           ((_d) ? to_intel_th_driver(_d) : NULL)
            ^
   drivers/hwtracing/intel_th/core.c:282:7: note: 'thdrv' is non-null
           if (!thdrv)
                ^~~~~
   drivers/hwtracing/intel_th/core.c:282:2: note: Taking false branch
           if (!thdrv)
           ^
   drivers/hwtracing/intel_th/core.c:285:6: note: Assuming field 'deactivate' 
is null
           if (thdrv->deactivate)
               ^~~~~~~~~~~~~~~~~
   drivers/hwtracing/intel_th/core.c:285:2: note: Taking false branch
           if (thdrv->deactivate)
           ^
   drivers/hwtracing/intel_th/core.c:288:3: note: Calling 
'intel_th_trace_disable'
                   intel_th_trace_disable(thdev);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hwtracing/intel_th/core.c:1022:2: note: 'hub' initialized to a null 
pointer value
           struct intel_th_device *hub = to_intel_th_device(thdev->dev.parent);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hwtracing/intel_th/core.c:1023:35: note: Dereference of null pointer
           struct intel_th_driver *hubdrv = to_intel_th_driver(hub->dev.driver);
                                            ^
   drivers/hwtracing/intel_th/intel_th.h:192:2: note: expanded from macro 
'to_intel_th_driver'
           container_of((_d), struct intel_th_driver, driver)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:18:25: note: expanded from macro 'container_of'
           void *__mptr = (void *)(ptr);                                   \
                                  ^~~~~
   drivers/hwtracing/intel_th/core.c:1040:26: warning: Value stored to 'hubdrv' 
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct intel_th_driver *hubdrv = to_intel_th_driver(hub->dev.driver);
                                   ^~~~~~
   drivers/hwtracing/intel_th/core.c:1040:26: note: Value stored to 'hubdrv' 
during its initialization is never read
           struct intel_th_driver *hubdrv = to_intel_th_driver(hub->dev.driver);
                                   ^~~~~~
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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-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 3 warnings (3 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.
   4 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 3 warnings (3 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.
   4 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 3 warnings (3 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.
   4 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: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 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   net/caif/cfrfml.c:223:14: warning: Access to field 'transmit' results in a 
dereference of a null pointer (loaded from field 'dn') 
[clang-analyzer-core.NullDereference]
           caif_assert(layr->dn->transmit != NULL);
                       ^
   include/net/caif/caif_layer.h:29:8: note: expanded from macro 'caif_assert'
           if (!(assert)) {                                        \

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]

Reply via email to