CC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Arnd Bergmann <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   f2e19fd15bd7cba347ce50be71955f5cd28a6019
commit: 7efbbe6e141466dbe022b39fafbc81d17a8ed8be [5495/13751] qcom_scm: hide 
Kconfig symbol
:::::: branch date: 3 days ago
:::::: commit date: 5 weeks ago
config: arm-randconfig-c002-20211009 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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/next/linux-next.git/commit/?id=7efbbe6e141466dbe022b39fafbc81d17a8ed8be
        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 7efbbe6e141466dbe022b39fafbc81d17a8ed8be
        # save the attached .config 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 >>)
           if ((map->m_lblk == ee_block) &&
                                         ^
   fs/ext4/extents.c:3481:14: note: Assuming the condition is false
           } else if (((map->m_lblk + map_len) == (ee_block + ee_len)) &&
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:3481:62: note: Left side of '&&' is false
           } else if (((map->m_lblk + map_len) == (ee_block + ee_len)) &&
                                                                       ^
   fs/ext4/extents.c:3528:6: note: 'allocated' is 0
           if (allocated) {
               ^~~~~~~~~
   fs/ext4/extents.c:3528:2: note: Taking false branch
           if (allocated) {
           ^
   fs/ext4/extents.c:3538:24: note: 'ee_block' is <= field 'm_lblk'
           WARN_ON(map->m_lblk < ee_block);
                                 ^
   include/asm-generic/bug.h:121:25: note: expanded from macro 'WARN_ON'
           int __ret_warn_on = !!(condition);                              \
                                  ^~~~~~~~~
   fs/ext4/extents.c:3538:2: note: Taking false branch
           WARN_ON(map->m_lblk < ee_block);
           ^
   include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON'
           if (unlikely(__ret_warn_on))                                    \
           ^
   fs/ext4/extents.c:3543:16: note: Assuming the condition is true
           split_flag |= ee_block + ee_len <= eof_block ? EXT4_EXT_MAY_ZEROOUT 
: 0;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:3543:16: note: '?' condition is true
   fs/ext4/extents.c:3545:2: note: Taking true branch
           if (EXT4_EXT_MAY_ZEROOUT & split_flag)
           ^
   fs/ext4/extents.c:3563:6: note: Assuming 'max_zeroout' is not equal to 0
           if (max_zeroout && (allocated > split_map.m_len)) {
               ^~~~~~~~~~~
   fs/ext4/extents.c:3563:6: note: Left side of '&&' is true
   fs/ext4/extents.c:3563:22: note: Assuming 'allocated' is > field 'm_len'
           if (max_zeroout && (allocated > split_map.m_len)) {
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:3563:2: note: Taking true branch
           if (max_zeroout && (allocated > split_map.m_len)) {
           ^
   fs/ext4/extents.c:3564:7: note: Assuming 'allocated' is > 'max_zeroout'
                   if (allocated <= max_zeroout) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:3564:3: note: Taking false branch
                   if (allocated <= max_zeroout) {
                   ^
   fs/ext4/extents.c:3579:7: note: Assuming the condition is true
                   if (split_map.m_lblk - ee_block + split_map.m_len <
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:3579:3: note: Taking true branch
                   if (split_map.m_lblk - ee_block + split_map.m_len <
                   ^
   fs/ext4/extents.c:3582:28: note: 'ee_block' is not equal to field 'm_lblk'
                           if (split_map.m_lblk != ee_block) {
                                                   ^~~~~~~~
   fs/ext4/extents.c:3582:4: note: Taking true branch
                           if (split_map.m_lblk != ee_block) {
                           ^
   fs/ext4/extents.c:3589:9: note: Assuming 'err' is not equal to 0
                                   if (err)
                                       ^~~
   fs/ext4/extents.c:3589:5: note: Taking true branch
                                   if (err)
                                   ^
   fs/ext4/extents.c:3590:6: note: Control jumps to line 3600
                                           goto fallback;
                                           ^
   fs/ext4/extents.c:3602:6: note: Assuming 'err' is <= 0
           if (err > 0)
               ^~~~~~~
   fs/ext4/extents.c:3602:2: note: Taking false branch
           if (err > 0)
           ^
   fs/ext4/extents.c:3606:6: note: Assuming 'err' is 0
           if (!err) {
               ^~~~
   fs/ext4/extents.c:3606:2: note: Taking true branch
           if (!err) {
           ^
   fs/ext4/extents.c:3607:9: note: Calling 'ext4_zeroout_es'
                   err = ext4_zeroout_es(inode, &zero_ex1);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/extents.c:3095:12: note: Assigned value is garbage or undefined
           ee_block  = le32_to_cpu(ex->ee_block);
                     ^
   fs/ext4/extents.c:3339:2: warning: Value stored to 'split_flag1' is never 
read [clang-analyzer-deadcode.DeadStores]
           split_flag1 = 0;
           ^             ~
   fs/ext4/extents.c:3339:2: note: Value stored to 'split_flag1' is never read
           split_flag1 = 0;
           ^             ~
   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.
   1 warning generated.
   Suppressed 1 warnings (1 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.
   1 warning generated.
>> drivers/firmware/qcom_scm.c:1126:8: warning: Assigned value is garbage or 
>> undefined [clang-analyzer-core.uninitialized.Assign]
           *resp = res.result[0];
                 ^ ~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:1118:6: note: Assuming 'req_cnt' is <= 
QCOM_SCM_HDCP_MAX_REQ_CNT
           if (req_cnt > QCOM_SCM_HDCP_MAX_REQ_CNT)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:1118:2: note: Taking false branch
           if (req_cnt > QCOM_SCM_HDCP_MAX_REQ_CNT)
           ^
   drivers/firmware/qcom_scm.c:1121:8: note: Calling 'qcom_scm_clk_enable'
           ret = qcom_scm_clk_enable();
                 ^~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:87:8: note: Calling 'clk_prepare_enable'
           ret = clk_prepare_enable(__scm->core_clk);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/clk.h:951:6: note: Assuming 'ret' is 0
           if (ret)
               ^~~
   include/linux/clk.h:951:2: note: Taking false branch
           if (ret)
           ^
   include/linux/clk.h:954:6: note: Assuming 'ret' is 0, which participates in 
a condition later
           if (ret)
               ^~~
   include/linux/clk.h:954:2: note: Taking false branch
           if (ret)
           ^
   include/linux/clk.h:957:2: note: Returning zero (loaded from 'ret'), which 
participates in a condition later
           return ret;
           ^~~~~~~~~~
   drivers/firmware/qcom_scm.c:87:8: note: Returning from 'clk_prepare_enable'
           ret = clk_prepare_enable(__scm->core_clk);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:88:6: note: 'ret' is 0
           if (ret)
               ^~~
   drivers/firmware/qcom_scm.c:88:2: note: Taking false branch
           if (ret)
           ^
   drivers/firmware/qcom_scm.c:91:8: note: Calling 'clk_prepare_enable'
           ret = clk_prepare_enable(__scm->iface_clk);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/clk.h:951:6: note: Assuming 'ret' is 0
           if (ret)
               ^~~
   include/linux/clk.h:951:2: note: Taking false branch
           if (ret)
           ^
   include/linux/clk.h:954:6: note: Assuming 'ret' is 0, which participates in 
a condition later
           if (ret)
               ^~~
   include/linux/clk.h:954:2: note: Taking false branch
           if (ret)
           ^
   include/linux/clk.h:957:2: note: Returning zero (loaded from 'ret'), which 
participates in a condition later
           return ret;
           ^~~~~~~~~~
   drivers/firmware/qcom_scm.c:91:8: note: Returning from 'clk_prepare_enable'
           ret = clk_prepare_enable(__scm->iface_clk);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:92:6: note: 'ret' is 0
           if (ret)
               ^~~
   drivers/firmware/qcom_scm.c:92:2: note: Taking false branch
           if (ret)
           ^
   drivers/firmware/qcom_scm.c:95:8: note: Calling 'clk_prepare_enable'
           ret = clk_prepare_enable(__scm->bus_clk);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/clk.h:951:6: note: Assuming 'ret' is 0
           if (ret)
               ^~~
   include/linux/clk.h:951:2: note: Taking false branch
           if (ret)
           ^
   include/linux/clk.h:954:6: note: Assuming 'ret' is 0, which participates in 
a condition later
           if (ret)
               ^~~
   include/linux/clk.h:954:2: note: Taking false branch
           if (ret)
           ^
   include/linux/clk.h:957:2: note: Returning zero (loaded from 'ret'), which 
participates in a condition later
           return ret;
           ^~~~~~~~~~
   drivers/firmware/qcom_scm.c:95:8: note: Returning from 'clk_prepare_enable'
           ret = clk_prepare_enable(__scm->bus_clk);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:96:6: note: 'ret' is 0
           if (ret)
               ^~~
   drivers/firmware/qcom_scm.c:96:2: note: Taking false branch
           if (ret)
           ^
   drivers/firmware/qcom_scm.c:99:2: note: Returning zero, which participates 
in a condition later
           return 0;
           ^~~~~~~~
   drivers/firmware/qcom_scm.c:1121:8: note: Returning from 
'qcom_scm_clk_enable'
           ret = qcom_scm_clk_enable();
                 ^~~~~~~~~~~~~~~~~~~~~
   drivers/firmware/qcom_scm.c:1122:6: note: 'ret' is 0
           if (ret)

vim +1126 drivers/firmware/qcom_scm.c

65f0c90b7d4685 Elliot Berman 2020-01-07  1086  
65f0c90b7d4685 Elliot Berman 2020-01-07  1087  /**
65f0c90b7d4685 Elliot Berman 2020-01-07  1088   * qcom_scm_hdcp_req() - Send 
HDCP request.
65f0c90b7d4685 Elliot Berman 2020-01-07  1089   * @req: HDCP request array
65f0c90b7d4685 Elliot Berman 2020-01-07  1090   * @req_cnt: HDCP request array 
count
65f0c90b7d4685 Elliot Berman 2020-01-07  1091   * @resp: response buffer passed 
to SCM
65f0c90b7d4685 Elliot Berman 2020-01-07  1092   *
65f0c90b7d4685 Elliot Berman 2020-01-07  1093   * Write HDCP register(s) 
through SCM.
65f0c90b7d4685 Elliot Berman 2020-01-07  1094   */
65f0c90b7d4685 Elliot Berman 2020-01-07  1095  int qcom_scm_hdcp_req(struct 
qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp)
65f0c90b7d4685 Elliot Berman 2020-01-07  1096  {
57d3b816718c1c Elliot Berman 2020-01-07  1097   int ret;
57d3b816718c1c Elliot Berman 2020-01-07  1098   struct qcom_scm_desc desc = {
57d3b816718c1c Elliot Berman 2020-01-07  1099           .svc = 
QCOM_SCM_SVC_HDCP,
57d3b816718c1c Elliot Berman 2020-01-07  1100           .cmd = 
QCOM_SCM_HDCP_INVOKE,
57d3b816718c1c Elliot Berman 2020-01-07  1101           .arginfo = 
QCOM_SCM_ARGS(10),
57d3b816718c1c Elliot Berman 2020-01-07  1102           .args = {
57d3b816718c1c Elliot Berman 2020-01-07  1103                   req[0].addr,
57d3b816718c1c Elliot Berman 2020-01-07  1104                   req[0].val,
57d3b816718c1c Elliot Berman 2020-01-07  1105                   req[1].addr,
57d3b816718c1c Elliot Berman 2020-01-07  1106                   req[1].val,
57d3b816718c1c Elliot Berman 2020-01-07  1107                   req[2].addr,
57d3b816718c1c Elliot Berman 2020-01-07  1108                   req[2].val,
57d3b816718c1c Elliot Berman 2020-01-07  1109                   req[3].addr,
57d3b816718c1c Elliot Berman 2020-01-07  1110                   req[3].val,
57d3b816718c1c Elliot Berman 2020-01-07  1111                   req[4].addr,
57d3b816718c1c Elliot Berman 2020-01-07  1112                   req[4].val
57d3b816718c1c Elliot Berman 2020-01-07  1113           },
57d3b816718c1c Elliot Berman 2020-01-07  1114           .owner = 
ARM_SMCCC_OWNER_SIP,
57d3b816718c1c Elliot Berman 2020-01-07  1115   };
57d3b816718c1c Elliot Berman 2020-01-07  1116   struct qcom_scm_res res;
57d3b816718c1c Elliot Berman 2020-01-07  1117  
57d3b816718c1c Elliot Berman 2020-01-07  1118   if (req_cnt > 
QCOM_SCM_HDCP_MAX_REQ_CNT)
57d3b816718c1c Elliot Berman 2020-01-07  1119           return -ERANGE;
65f0c90b7d4685 Elliot Berman 2020-01-07  1120  
57d3b816718c1c Elliot Berman 2020-01-07  1121   ret = qcom_scm_clk_enable();
65f0c90b7d4685 Elliot Berman 2020-01-07  1122   if (ret)
65f0c90b7d4685 Elliot Berman 2020-01-07  1123           return ret;
65f0c90b7d4685 Elliot Berman 2020-01-07  1124  
57d3b816718c1c Elliot Berman 2020-01-07  1125   ret = qcom_scm_call(__scm->dev, 
&desc, &res);
57d3b816718c1c Elliot Berman 2020-01-07 @1126   *resp = res.result[0];
57d3b816718c1c Elliot Berman 2020-01-07  1127  
65f0c90b7d4685 Elliot Berman 2020-01-07  1128   qcom_scm_clk_disable();
57d3b816718c1c Elliot Berman 2020-01-07  1129  
65f0c90b7d4685 Elliot Berman 2020-01-07  1130   return ret;
65f0c90b7d4685 Elliot Berman 2020-01-07  1131  }
65f0c90b7d4685 Elliot Berman 2020-01-07  1132  EXPORT_SYMBOL(qcom_scm_hdcp_req);
65f0c90b7d4685 Elliot Berman 2020-01-07  1133  

:::::: The code at line 1126 was first introduced by commit
:::::: 57d3b816718c1cf832e2929a754da3564c6127cc firmware: qcom_scm: Remove thin 
wrappers

:::::: TO: Elliot Berman <[email protected]>
:::::: CC: Bjorn Andersson <[email protected]>

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