* [soc-thermal:for-kernelci 19/35] drivers/thermal/qcom/tsens-v0_1.c:189 calibrate_8974() warn: passing zero to 'PTR_ERR'
@ 2019-04-24 14:14 Dan Carpenter
2019-04-24 14:14 ` Dan Carpenter
2019-04-25 10:53 ` Amit Kucheria
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-04-24 14:14 UTC (permalink / raw)
To: kbuild, Amit Kucheria; +Cc: Eduardo Valentin, kbuild-all, linux-pm
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 {
^ permalink raw reply [flat|nested] 3+ messages in thread
* [soc-thermal:for-kernelci 19/35] drivers/thermal/qcom/tsens-v0_1.c:189 calibrate_8974() warn: passing zero to 'PTR_ERR'
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-24 14:14 ` Dan Carpenter
2019-04-25 10:53 ` Amit Kucheria
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-04-24 14:14 UTC (permalink / raw)
To: kbuild, Amit Kucheria; +Cc: kbuild-all, linux-pm, Eduardo Valentin
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [soc-thermal:for-kernelci 19/35] drivers/thermal/qcom/tsens-v0_1.c:189 calibrate_8974() warn: passing zero to 'PTR_ERR'
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-24 14:14 ` Dan Carpenter
@ 2019-04-25 10:53 ` Amit Kucheria
1 sibling, 0 replies; 3+ messages in thread
From: Amit Kucheria @ 2019-04-25 10:53 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kbuild, kbuild-all, Linux PM list, Eduardo Valentin
On Wed, Apr 24, 2019 at 7:44 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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).
Yes, it seems that might be the case.
Eduardo, this commit is simply moving some old code around that I
didn't write. I'd prefer not to touch it in this series but instead
fix it in a separate series. The code move was done to enable a
rewrite, in any case.
Regards,
Amit
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-25 10:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-24 14:14 ` Dan Carpenter
2019-04-25 10:53 ` Amit Kucheria
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox