CC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Phong LE <[email protected]>
CC: Neil Armstrong <[email protected]>
CC: Robert Foss <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c7d102232649226a69dddd58a4942cf13cff4f7c
commit: 988156dc2fc9f260f4296633e47ec9cf0c61a498 drm: bridge: add it66121 driver
date:   3 months ago
:::::: branch date: 3 days ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-c001-20210731 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 
4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=988156dc2fc9f260f4296633e47ec9cf0c61a498
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 988156dc2fc9f260f4296633e47ec9cf0c61a498
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 
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/gpu/drm/radeon/evergreen.c:2741:2: note: Loop condition is true.  
Entering loop body
           for (i = 0; i < rdev->num_crtc; i++) {
           ^
   drivers/gpu/drm/radeon/evergreen.c:2742:7: note: Branch condition evaluates 
to a garbage value
                   if (save->crtc_enabled[i]) {
                       ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/radeon/evergreen.c:3978:3: warning: Value stored to 'tmp' is 
never read [clang-analyzer-deadcode.DeadStores]
                   tmp = RREG32(GRBM_SOFT_RESET);
                   ^
   drivers/gpu/drm/radeon/evergreen.c:3978:3: note: Value stored to 'tmp' is 
never read
   drivers/gpu/drm/radeon/evergreen.c:3992:3: warning: Value stored to 'tmp' is 
never read [clang-analyzer-deadcode.DeadStores]
                   tmp = RREG32(SRBM_SOFT_RESET);
                   ^
   drivers/gpu/drm/radeon/evergreen.c:3992:3: note: Value stored to 'tmp' 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.
   9 warnings generated.
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:135:67: warning: Assigned 
value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
                   
securedisplay_cmd->securedisplay_in_message.send_roi_crc.phy_id = phy_id;
                                                                                
   ^ ~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:93:2: note: 'phy_id' 
declared without an initial value
           uint32_t phy_id;
           ^~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:100:6: note: Assuming the 
condition is false
           if (*pos || size > sizeof(str) - 1)
               ^~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:100:6: note: Left side of 
'||' is false
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:100:14: note: Assuming the 
condition is false
           if (*pos || size > sizeof(str) - 1)
                       ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:100:2: note: Taking false 
branch
           if (*pos || size > sizeof(str) - 1)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:104:8: note: Calling 
'copy_from_user'
           ret = copy_from_user(str, buf, size);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/uaccess.h:191:2: note: Taking true branch
           if (likely(check_copy_size(to, n, false)))
           ^
   include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), 
which participates in a condition later
           return n;
           ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:104:8: note: Returning 
from 'copy_from_user'
           ret = copy_from_user(str, buf, size);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:105:6: note: Assuming 
'ret' is 0
           if (ret)
               ^~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:105:2: note: Taking false 
branch
           if (ret)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:109:6: note: Assuming 
'ret' is >= 0
           if (ret < 0) {
               ^~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:109:2: note: Taking false 
branch
           if (ret < 0) {
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:114:6: note: Assuming 
'size' is < 3
           if (size < 3)
               ^~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:114:2: note: Taking true 
branch
           if (size < 3)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:119:2: note: Control jumps 
to 'case 2:'  at line 132
           switch (op) {
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:135:67: note: Assigned 
value is garbage or undefined
                   
securedisplay_cmd->securedisplay_in_message.send_roi_crc.phy_id = phy_id;
                                                                                
   ^ ~~~~~~
   Suppressed 8 warnings (8 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.
   4 warnings generated.
   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.
   4 warnings generated.
   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.
   9 warnings generated.
   drivers/gpu/drm/bridge/adv7511/adv7511_drv.c:508:3: warning: Value stored to 
'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = wait_event_interruptible_timeout(adv7511->wq,
                   ^
   drivers/gpu/drm/bridge/adv7511/adv7511_drv.c:508:3: note: Value stored to 
'ret' is never read
   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.
   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.
   5 warnings generated.
   Suppressed 5 warnings (5 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.
   7 warnings generated.
>> drivers/gpu/drm/bridge/ite-it66121.c:538:2: warning: Value stored to 'ret' 
>> is never read [clang-analyzer-deadcode.DeadStores]
           ret = drm_bridge_attach(bridge->encoder, ctx->next_bridge, bridge, 
flags);
           ^     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/ite-it66121.c:538:2: note: Value stored to 'ret' is 
never read
           ret = drm_bridge_attach(bridge->encoder, ctx->next_bridge, bridge, 
flags);
           ^     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: warning: Value 
stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: note: Value stored 
to 'err' is never read
           err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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.
   drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: warning: Value 
stored to 'reg' is never read [clang-analyzer-deadcode.DeadStores]
           reg = readl(dp->reg_base + ANALOGIX_DP_SYS_CTL_3);
           ^
   drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: note: Value stored 
to 'reg' is never read
   Suppressed 5 warnings (5 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.
   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.
   5 warnings generated.
   Suppressed 5 warnings (5 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 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.
   4 warnings generated.
   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.
   4 warnings generated.
   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.
   4 warnings generated.
   drivers/mfd/vx855.c:89:2: warning: Value stored to 'ret' is never read 
[clang-analyzer-deadcode.DeadStores]
           ret = mfd_add_devices(&pdev->dev, -1, vx855_cells, 
ARRAY_SIZE(vx855_cells),
           ^     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/vx855.c:89:2: note: Value stored to 'ret' is never read
           ret = mfd_add_devices(&pdev->dev, -1, vx855_cells, 
ARRAY_SIZE(vx855_cells),
           ^     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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.
   4 warnings generated.
   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.
   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.
   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.
   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.
   4 warnings generated.
   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.
   5 warnings generated.
   Suppressed 5 warnings (5 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.
   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.
   4 warnings generated.
   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.
   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.
   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.
   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.
   4 warnings generated.
   drivers/tty/serial/8250/8250_pci.c:1298:9: warning: Although the value 
stored to 'tmp' is used in the enclosing expression, the value is never 
actually read from 'tmp' [clang-analyzer-deadcode.DeadStores]

vim +/ret +538 drivers/gpu/drm/bridge/ite-it66121.c

988156dc2fc9f2 Phong LE 2021-04-19  528  
988156dc2fc9f2 Phong LE 2021-04-19  529  static int 
it66121_bridge_attach(struct drm_bridge *bridge,
988156dc2fc9f2 Phong LE 2021-04-19  530                                  enum 
drm_bridge_attach_flags flags)
988156dc2fc9f2 Phong LE 2021-04-19  531  {
988156dc2fc9f2 Phong LE 2021-04-19  532         struct it66121_ctx *ctx = 
container_of(bridge, struct it66121_ctx, bridge);
988156dc2fc9f2 Phong LE 2021-04-19  533         int ret;
988156dc2fc9f2 Phong LE 2021-04-19  534  
988156dc2fc9f2 Phong LE 2021-04-19  535         if (!(flags & 
DRM_BRIDGE_ATTACH_NO_CONNECTOR))
988156dc2fc9f2 Phong LE 2021-04-19  536                 return -EINVAL;
988156dc2fc9f2 Phong LE 2021-04-19  537  
988156dc2fc9f2 Phong LE 2021-04-19 @538         ret = 
drm_bridge_attach(bridge->encoder, ctx->next_bridge, bridge, flags);
988156dc2fc9f2 Phong LE 2021-04-19  539  
988156dc2fc9f2 Phong LE 2021-04-19  540         ret = 
regmap_write_bits(ctx->regmap, IT66121_CLK_BANK_REG,
988156dc2fc9f2 Phong LE 2021-04-19  541                                 
IT66121_CLK_BANK_PWROFF_RCLK, 0);
988156dc2fc9f2 Phong LE 2021-04-19  542         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  543                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  544  
988156dc2fc9f2 Phong LE 2021-04-19  545         ret = 
regmap_write_bits(ctx->regmap, IT66121_INT_REG,
988156dc2fc9f2 Phong LE 2021-04-19  546                                 
IT66121_INT_TX_CLK_OFF, 0);
988156dc2fc9f2 Phong LE 2021-04-19  547         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  548                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  549  
988156dc2fc9f2 Phong LE 2021-04-19  550         ret = 
regmap_write_bits(ctx->regmap, IT66121_AFE_DRV_REG,
988156dc2fc9f2 Phong LE 2021-04-19  551                                 
IT66121_AFE_DRV_PWD, 0);
988156dc2fc9f2 Phong LE 2021-04-19  552         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  553                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  554  
988156dc2fc9f2 Phong LE 2021-04-19  555         ret = 
regmap_write_bits(ctx->regmap, IT66121_AFE_XP_REG,
988156dc2fc9f2 Phong LE 2021-04-19  556                                 
IT66121_AFE_XP_PWDI | IT66121_AFE_XP_PWDPLL, 0);
988156dc2fc9f2 Phong LE 2021-04-19  557         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  558                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  559  
988156dc2fc9f2 Phong LE 2021-04-19  560         ret = 
regmap_write_bits(ctx->regmap, IT66121_AFE_IP_REG,
988156dc2fc9f2 Phong LE 2021-04-19  561                                 
IT66121_AFE_IP_PWDPLL, 0);
988156dc2fc9f2 Phong LE 2021-04-19  562         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  563                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  564  
988156dc2fc9f2 Phong LE 2021-04-19  565         ret = 
regmap_write_bits(ctx->regmap, IT66121_AFE_DRV_REG,
988156dc2fc9f2 Phong LE 2021-04-19  566                                 
IT66121_AFE_DRV_RST, 0);
988156dc2fc9f2 Phong LE 2021-04-19  567         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  568                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  569  
988156dc2fc9f2 Phong LE 2021-04-19  570         ret = 
regmap_write_bits(ctx->regmap, IT66121_AFE_XP_REG,
988156dc2fc9f2 Phong LE 2021-04-19  571                                 
IT66121_AFE_XP_RESETB, IT66121_AFE_XP_RESETB);
988156dc2fc9f2 Phong LE 2021-04-19  572         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  573                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  574  
988156dc2fc9f2 Phong LE 2021-04-19  575         ret = 
regmap_write_bits(ctx->regmap, IT66121_AFE_IP_REG,
988156dc2fc9f2 Phong LE 2021-04-19  576                                 
IT66121_AFE_IP_RESETB, IT66121_AFE_IP_RESETB);
988156dc2fc9f2 Phong LE 2021-04-19  577         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  578                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  579  
988156dc2fc9f2 Phong LE 2021-04-19  580         ret = 
regmap_write_bits(ctx->regmap, IT66121_SW_RST_REG,
988156dc2fc9f2 Phong LE 2021-04-19  581                                 
IT66121_SW_RST_REF,
988156dc2fc9f2 Phong LE 2021-04-19  582                                 
IT66121_SW_RST_REF);
988156dc2fc9f2 Phong LE 2021-04-19  583         if (ret)
988156dc2fc9f2 Phong LE 2021-04-19  584                 return ret;
988156dc2fc9f2 Phong LE 2021-04-19  585  
988156dc2fc9f2 Phong LE 2021-04-19  586         /* Per programming manual, 
sleep here for bridge to settle */
988156dc2fc9f2 Phong LE 2021-04-19  587         msleep(50);
988156dc2fc9f2 Phong LE 2021-04-19  588  
988156dc2fc9f2 Phong LE 2021-04-19  589         /* Start interrupts */
988156dc2fc9f2 Phong LE 2021-04-19  590         return 
regmap_write_bits(ctx->regmap, IT66121_INT_MASK1_REG,
988156dc2fc9f2 Phong LE 2021-04-19  591                                  
IT66121_INT_MASK1_DDC_NOACK |
988156dc2fc9f2 Phong LE 2021-04-19  592                                  
IT66121_INT_MASK1_DDC_FIFOERR |
988156dc2fc9f2 Phong LE 2021-04-19  593                                  
IT66121_INT_MASK1_DDC_BUSHANG, 0);
988156dc2fc9f2 Phong LE 2021-04-19  594  }
988156dc2fc9f2 Phong LE 2021-04-19  595  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to