From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Amit Kucheria <amit.kucheria@linaro.org>
Cc: Eduardo Valentin <edubezval@gmail.com>,
kbuild-all@01.org, linux-pm@vger.kernel.org
Subject: [soc-thermal:for-kernelci 19/35] drivers/thermal/qcom/tsens-v0_1.c:189 calibrate_8974() warn: passing zero to 'PTR_ERR'
Date: Wed, 24 Apr 2019 17:14:39 +0300 [thread overview]
Message-ID: <20190424141439.GG14820@kadam> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git for-kernelci
head: 0e50a5ee6b8a23c6798aae23efcd4b8e055c06ef
commit: 5853cb769573b58c319fa62e1987d063b8c5b77e [19/35] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
New smatch warnings:
drivers/thermal/qcom/tsens-v0_1.c:228 calibrate_8974() warn: mask and shift to zero
# https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?id=5853cb769573b58c319fa62e1987d063b8c5b77e
git remote add soc-thermal https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
git remote update soc-thermal
git checkout 5853cb769573b58c319fa62e1987d063b8c5b77e
vim +/PTR_ERR +189 drivers/thermal/qcom/tsens-v0_1.c
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 216 /* Fall through */
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 217 case ONE_PT_CALIB:
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 218 case ONE_PT_CALIB2:
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 219 base1 = bkp[0] & BASE1_MASK;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 220 p1[0] = (bkp[0] & S0_P1_MASK) >> S0_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 221 p1[1] = (bkp[0] & S1_P1_MASK) >> S1_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 222 p1[2] = (bkp[0] & S2_P1_MASK) >> S2_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 223 p1[3] = (bkp[0] & S3_P1_MASK) >> S3_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 224 p1[4] = (bkp[1] & S4_P1_MASK);
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 225 p1[5] = (bkp[1] & S5_P1_MASK) >> S5_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 226 p1[6] = (bkp[1] & S6_P1_MASK) >> S6_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 227 p1[7] = (bkp[1] & S7_P1_MASK) >> S7_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 @228 p1[8] = (bkp[2] & S8_P1_MASK_BKP) >> S8_P1_SHIFT;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
p1[8] always ends up being zero. (I haven't look at the code, that's
what the static checker is saying).
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 229 p1[9] = (bkp[2] & S9_P1_MASK_BKP) >> S9_P1_BKP_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 230 p1[10] = (bkp[2] & S10_P1_MASK_BKP) >> S10_P1_BKP_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 231 break;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 232 }
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 233 } else {
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Amit Kucheria <amit.kucheria@linaro.org>
Cc: kbuild-all@01.org, linux-pm@vger.kernel.org,
Eduardo Valentin <edubezval@gmail.com>
Subject: [soc-thermal:for-kernelci 19/35] drivers/thermal/qcom/tsens-v0_1.c:189 calibrate_8974() warn: passing zero to 'PTR_ERR'
Date: Wed, 24 Apr 2019 17:14:39 +0300 [thread overview]
Message-ID: <20190424141439.GG14820@kadam> (raw)
Message-ID: <20190424141439.RueIa2Ftdd7nqJ58k0fFLQBgm1VgWjp10xaHOiB0V0I@z> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git for-kernelci
head: 0e50a5ee6b8a23c6798aae23efcd4b8e055c06ef
commit: 5853cb769573b58c319fa62e1987d063b8c5b77e [19/35] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
New smatch warnings:
drivers/thermal/qcom/tsens-v0_1.c:228 calibrate_8974() warn: mask and shift to zero
# https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?id=5853cb769573b58c319fa62e1987d063b8c5b77e
git remote add soc-thermal https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
git remote update soc-thermal
git checkout 5853cb769573b58c319fa62e1987d063b8c5b77e
vim +/PTR_ERR +189 drivers/thermal/qcom/tsens-v0_1.c
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 216 /* Fall through */
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 217 case ONE_PT_CALIB:
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 218 case ONE_PT_CALIB2:
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 219 base1 = bkp[0] & BASE1_MASK;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 220 p1[0] = (bkp[0] & S0_P1_MASK) >> S0_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 221 p1[1] = (bkp[0] & S1_P1_MASK) >> S1_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 222 p1[2] = (bkp[0] & S2_P1_MASK) >> S2_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 223 p1[3] = (bkp[0] & S3_P1_MASK) >> S3_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 224 p1[4] = (bkp[1] & S4_P1_MASK);
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 225 p1[5] = (bkp[1] & S5_P1_MASK) >> S5_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 226 p1[6] = (bkp[1] & S6_P1_MASK) >> S6_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 227 p1[7] = (bkp[1] & S7_P1_MASK) >> S7_P1_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 @228 p1[8] = (bkp[2] & S8_P1_MASK_BKP) >> S8_P1_SHIFT;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
p1[8] always ends up being zero. (I haven't look at the code, that's
what the static checker is saying).
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 229 p1[9] = (bkp[2] & S9_P1_MASK_BKP) >> S9_P1_BKP_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 230 p1[10] = (bkp[2] & S10_P1_MASK_BKP) >> S10_P1_BKP_SHIFT;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 231 break;
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 232 }
5853cb7695 drivers/thermal/qcom/tsens-v0_1.c Amit Kucheria 2019-03-20 233 } else {
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next reply other threads:[~2019-04-24 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 14:14 Dan Carpenter [this message]
2019-04-24 14:14 ` [soc-thermal:for-kernelci 19/35] drivers/thermal/qcom/tsens-v0_1.c:189 calibrate_8974() warn: passing zero to 'PTR_ERR' Dan Carpenter
2019-04-25 10:53 ` Amit Kucheria
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190424141439.GG14820@kadam \
--to=dan.carpenter@oracle.com \
--cc=amit.kucheria@linaro.org \
--cc=edubezval@gmail.com \
--cc=kbuild-all@01.org \
--cc=kbuild@01.org \
--cc=linux-pm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox