CC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Emil Renner Berthing <[email protected]>
CC: Andy Shevchenko <[email protected]>
CC: Linus Walleij <[email protected]>
CC: Huan Feng <[email protected]>
CC: Drew Fustini <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   88808fbbead481aedb46640a5ace69c58287f56a
commit: ec648f6b7686b716424e8e73eebb4c11ae199187 pinctrl: starfive: Add pinctrl 
driver for StarFive SoCs
date:   7 weeks ago
:::::: branch date: 5 hours ago
:::::: commit date: 7 weeks ago
config: arm-randconfig-c002-20220201 
(https://download.01.org/0day-ci/archive/20220203/[email protected]/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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=ec648f6b7686b716424e8e73eebb4c11ae199187
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout ec648f6b7686b716424e8e73eebb4c11ae199187
        # 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 >>)
                                                   ^
   fs/ext4/extents.c:4181:6: note: Assuming the condition is false
           if ((flags & EXT4_GET_BLOCKS_CREATE) == 0) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:4181:2: note: Taking false branch
           if ((flags & EXT4_GET_BLOCKS_CREATE) == 0) {
           ^
   fs/ext4/extents.c:4211:6: note: Assuming 'cluster_offset' is 0
           if (cluster_offset && ex &&
               ^~~~~~~~~~~~~~
   fs/ext4/extents.c:4211:21: note: Left side of '&&' is false
           if (cluster_offset && ex &&
                              ^
   fs/ext4/extents.c:4221:6: note: 'err' is 0
           if (err)
               ^~~
   fs/ext4/extents.c:4221:2: note: Taking false branch
           if (err)
           ^
   fs/ext4/extents.c:4224:8: note: Calling 'ext4_ext_search_right'
           err = ext4_ext_search_right(inode, path, &ar.lright, &ar.pright, 
&ex2);
                 
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:1539:15: note: 'path' is not equal to null
           if (unlikely(path == NULL)) {
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/ext4/extents.c:1539:2: note: Taking false branch
           if (unlikely(path == NULL)) {
           ^
   fs/ext4/extents.c:1546:6: note: 'depth' is not equal to 0
           if (depth == 0 && path->p_ext == NULL)
               ^~~~~
   fs/ext4/extents.c:1546:17: note: Left side of '&&' is false
           if (depth == 0 && path->p_ext == NULL)
                          ^
   fs/ext4/extents.c:1555:2: note: Taking false branch
           if (*logical < le32_to_cpu(ex->ee_block)) {
           ^
   fs/ext4/extents.c:1574:2: note: Taking false branch
           if (unlikely(*logical < (le32_to_cpu(ex->ee_block) + ee_len))) {
           ^
   fs/ext4/extents.c:1581:6: note: Assuming the condition is false
           if (ex != EXT_LAST_EXTENT(path[depth].p_hdr)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:1581:2: note: Taking false branch
           if (ex != EXT_LAST_EXTENT(path[depth].p_hdr)) {
           ^
   fs/ext4/extents.c:1588:2: note: Loop condition is true.  Entering loop body
           while (--depth >= 0) {
           ^
   fs/ext4/extents.c:1590:7: note: Assuming the condition is true
                   if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:1590:3: note: Taking true branch
                   if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
                   ^
   fs/ext4/extents.c:1591:4: note: Control jumps to line 1601
                           goto got_index;
                           ^
   fs/ext4/extents.c:1602:2: note: Loop condition is false. Execution continues 
on line 1612
           while (++depth < path->p_depth) {
           ^
   fs/ext4/extents.c:1613:2: note: Taking true branch
           if (IS_ERR(bh))
           ^
   fs/ext4/extents.c:1614:3: note: Returning without writing to 
'ret_ex->ee_block'
                   return PTR_ERR(bh);
                   ^
   fs/ext4/extents.c:4224:8: note: Returning from 'ext4_ext_search_right'
           err = ext4_ext_search_right(inode, path, &ar.lright, &ar.pright, 
&ex2);
                 
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:4225:6: note: 'err' is >= 0
           if (err < 0)
               ^~~
   fs/ext4/extents.c:4225:2: note: Taking false branch
           if (err < 0)
           ^
   fs/ext4/extents.c:4230:7: note: Assuming field 's_cluster_ratio' is > 1
           if ((sbi->s_cluster_ratio > 1) && err &&
                ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:4230:6: note: Left side of '&&' is true
           if ((sbi->s_cluster_ratio > 1) && err &&
               ^
   fs/ext4/extents.c:4230:36: note: 'err' is not equal to 0
           if ((sbi->s_cluster_ratio > 1) && err &&
                                             ^~~
   fs/ext4/extents.c:4230:6: note: Left side of '&&' is true
           if ((sbi->s_cluster_ratio > 1) && err &&
               ^
   fs/ext4/extents.c:4231:6: note: Calling 'get_implied_cluster_alloc'
               get_implied_cluster_alloc(inode->i_sb, map, &ex2, path)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:4013:2: note: Assigned value is garbage or undefined
           ext4_lblk_t ee_block = le32_to_cpu(ex->ee_block);
           ^
   Suppressed 4 warnings (4 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.
>> drivers/pinctrl/pinctrl-starfive.c:640:17: warning: Value stored to 'dev' 
>> during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = sfp->gc.parent;
                          ^~~   ~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-starfive.c:640:17: note: Value stored to 'dev' 
during its initialization is never read
           struct device *dev = sfp->gc.parent;
                          ^~~   ~~~~~~~~~~~~~~
   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.
   2 warnings generated.
   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.
   6 warnings generated.
   drivers/pinctrl/pinctrl-ingenic.c:3627:15: warning: Value stored to 'idx' 
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int idx = pin % PINS_PER_GPIO_CHIP;
                        ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3627:15: note: Value stored to 'idx' 
during its initialization is never read
           unsigned int idx = pin % PINS_PER_GPIO_CHIP;
                        ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3628:15: warning: Value stored to 'offt' 
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int offt = pin / PINS_PER_GPIO_CHIP;
                        ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3628:15: note: Value stored to 'offt' 
during its initialization is never read
           unsigned int offt = pin / PINS_PER_GPIO_CHIP;
                        ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3696:15: warning: Value stored to 'idx' 
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int idx = pin % PINS_PER_GPIO_CHIP;
                        ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3696:15: note: Value stored to 'idx' 
during its initialization is never read
           unsigned int idx = pin % PINS_PER_GPIO_CHIP;
                        ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3697:15: warning: Value stored to 'offt' 
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int offt = pin / PINS_PER_GPIO_CHIP;
                        ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/pinctrl-ingenic.c:3697:15: note: Value stored to 'offt' 
during its initialization is never read
           unsigned int offt = pin / PINS_PER_GPIO_CHIP;
                        ^~~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   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.
   2 warnings generated.
   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.
   2 warnings generated.
   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.
   2 warnings generated.
   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.
   2 warnings generated.
   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.
   9 warnings generated.
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:73:2: warning: Value stored to 
'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_clk_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:73:2: note: Value stored to 'temp' 
is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:77:2: warning: Value stored to 
'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_data_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:77:2: note: Value stored to 'temp' 
is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:92:2: warning: Value stored to 
'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_clk_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:92:2: note: Value stored to 'temp' 
is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:96:2: warning: Value stored to 
'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_data_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:96:2: note: Value stored to 'temp' 
is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:312:3: warning: 4th function call 
argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
                   DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n",
                   ^
   include/drm/drm_print.h:526:2: note: expanded from macro 'DRM_DEBUG'
           __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:371:2: note: 'val' declared without 
an initial value
           u8 val;
           ^~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:373:6: note: Assuming field 
'cd_valid' is true
           if (!amdgpu_connector->router.cd_valid)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:373:2: note: Taking false branch
           if (!amdgpu_connector->router.cd_valid)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:376:6: note: Assuming field 
'router_bus' is non-null
           if (!amdgpu_connector->router_bus)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:376:2: note: Taking false branch
           if (!amdgpu_connector->router_bus)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:379:2: note: Calling 
'amdgpu_i2c_get_byte'
           amdgpu_i2c_get_byte(amdgpu_connector->router_bus,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:308:6: note: Assuming the condition 
is false
           if (i2c_transfer(&i2c_bus->adapter, msgs, 2) == 2) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:308:2: note: Taking false branch
           if (i2c_transfer(&i2c_bus->adapter, msgs, 2) == 2) {
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:312:3: note: 4th function call 
argument is an uninitialized value
                   DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n",
                   ^
   include/drm/drm_print.h:526:2: note: expanded from macro 'DRM_DEBUG'

vim +/dev +640 drivers/pinctrl/pinctrl-starfive.c

ec648f6b7686b7 Emil Renner Berthing 2021-07-06  635  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  636  static int 
starfive_set_mux(struct pinctrl_dev *pctldev,
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  637                         
unsigned int fsel, unsigned int gsel)
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  638  {
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  639     struct starfive_pinctrl 
*sfp = pinctrl_dev_get_drvdata(pctldev);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06 @640     struct device *dev = 
sfp->gc.parent;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  641     const struct group_desc 
*group;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  642     const u32 *pinmux;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  643     unsigned int i;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  644  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  645     group = 
pinctrl_generic_get_group(pctldev, gsel);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  646     if (!group)
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  647             return -EINVAL;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  648  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  649     pinmux = group->data;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  650     for (i = 0; i < 
group->num_pins; i++) {
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  651             u32 v = 
pinmux[i];
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  652             unsigned int 
gpio = starfive_pinmux_to_gpio(v);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  653             u32 dout = 
starfive_pinmux_to_dout(v);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  654             u32 doen = 
starfive_pinmux_to_doen(v);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  655             u32 din = 
starfive_pinmux_to_din(v);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  656             void __iomem 
*reg_dout;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  657             void __iomem 
*reg_doen;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  658             void __iomem 
*reg_din;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  659             unsigned long 
flags;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  660  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  661             dev_dbg(dev, 
"GPIO%u: dout=0x%x doen=0x%x din=0x%x\n",
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  662                     gpio, 
dout, doen, din);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  663  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  664             reg_dout = 
sfp->base + GPON_DOUT_CFG + 8 * gpio;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  665             reg_doen = 
sfp->base + GPON_DOEN_CFG + 8 * gpio;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  666             if (din != 
GPI_NONE)
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  667                     reg_din 
= sfp->base + GPI_CFG_OFFSET + 4 * din;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  668             else
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  669                     reg_din 
= NULL;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  670  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  671             
raw_spin_lock_irqsave(&sfp->lock, flags);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  672             
writel_relaxed(dout, reg_dout);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  673             
writel_relaxed(doen, reg_doen);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  674             if (reg_din)
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  675                     
writel_relaxed(gpio + 2, reg_din);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  676             
raw_spin_unlock_irqrestore(&sfp->lock, flags);
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  677     }
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  678  
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  679     return 0;
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  680  }
ec648f6b7686b7 Emil Renner Berthing 2021-07-06  681  

---
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