CC: [email protected]
CC: [email protected]
TO: Stephen Boyd <[email protected]>
CC: Bjorn Andersson <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   d6d09a6942050f21b065a134169002b4d6b701ef
commit: 9d11af8b06a811c5c4878625f51ce109e2af4e80 firmware: qcom_scm: Make 
__qcom_scm_is_call_available() return bool
date:   4 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 4 months ago
config: arm-randconfig-m031-20210818 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/firmware/qcom_scm.c:242 __qcom_scm_is_call_available() warn: signedness 
bug returning '(-22)'

vim +242 drivers/firmware/qcom_scm.c

9a434cee773ae1 Elliot Berman 2020-01-07  218  
9d11af8b06a811 Stephen Boyd  2021-02-23  219  static bool 
__qcom_scm_is_call_available(struct device *dev, u32 svc_id,
9a434cee773ae1 Elliot Berman 2020-01-07  220                                    
 u32 cmd_id)
9a434cee773ae1 Elliot Berman 2020-01-07  221  {
9a434cee773ae1 Elliot Berman 2020-01-07  222    int ret;
9a434cee773ae1 Elliot Berman 2020-01-07  223    struct qcom_scm_desc desc = {
9a434cee773ae1 Elliot Berman 2020-01-07  224            .svc = 
QCOM_SCM_SVC_INFO,
9a434cee773ae1 Elliot Berman 2020-01-07  225            .cmd = 
QCOM_SCM_INFO_IS_CALL_AVAIL,
9a434cee773ae1 Elliot Berman 2020-01-07  226            .owner = 
ARM_SMCCC_OWNER_SIP,
9a434cee773ae1 Elliot Berman 2020-01-07  227    };
9a434cee773ae1 Elliot Berman 2020-01-07  228    struct qcom_scm_res res;
9a434cee773ae1 Elliot Berman 2020-01-07  229  
9a434cee773ae1 Elliot Berman 2020-01-07  230    desc.arginfo = QCOM_SCM_ARGS(1);
9a434cee773ae1 Elliot Berman 2020-01-07  231    switch (__get_convention()) {
9a434cee773ae1 Elliot Berman 2020-01-07  232    case SMC_CONVENTION_ARM_32:
9a434cee773ae1 Elliot Berman 2020-01-07  233    case SMC_CONVENTION_ARM_64:
9a434cee773ae1 Elliot Berman 2020-01-07  234            desc.args[0] = 
SCM_SMC_FNID(svc_id, cmd_id) |
9a434cee773ae1 Elliot Berman 2020-01-07  235                            
(ARM_SMCCC_OWNER_SIP << ARM_SMCCC_OWNER_SHIFT);
9a434cee773ae1 Elliot Berman 2020-01-07  236            break;
9a434cee773ae1 Elliot Berman 2020-01-07  237    case SMC_CONVENTION_LEGACY:
9a434cee773ae1 Elliot Berman 2020-01-07  238            desc.args[0] = 
SCM_LEGACY_FNID(svc_id, cmd_id);
9a434cee773ae1 Elliot Berman 2020-01-07  239            break;
9a434cee773ae1 Elliot Berman 2020-01-07  240    default:
9a434cee773ae1 Elliot Berman 2020-01-07  241            pr_err("Unknown SMC 
convention being used\n");
9a434cee773ae1 Elliot Berman 2020-01-07 @242            return -EINVAL;
9a434cee773ae1 Elliot Berman 2020-01-07  243    }
9a434cee773ae1 Elliot Berman 2020-01-07  244  
9a434cee773ae1 Elliot Berman 2020-01-07  245    ret = qcom_scm_call(dev, &desc, 
&res);
9a434cee773ae1 Elliot Berman 2020-01-07  246  
9d11af8b06a811 Stephen Boyd  2021-02-23  247    return ret ? false : 
!!res.result[0];
9a434cee773ae1 Elliot Berman 2020-01-07  248  }
9a434cee773ae1 Elliot Berman 2020-01-07  249  

:::::: The code at line 242 was first introduced by commit
:::::: 9a434cee773ae15309ac225f27551b5492618e4a firmware: qcom_scm: Dynamically 
support SMCCC and legacy conventions

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