From: Dan Carpenter <dan.carpenter@oracle.com>
To: amit.kucheria@linaro.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>, linux-pm@vger.kernel.org
Subject: [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
Date: Tue, 14 May 2019 12:06:35 +0300 [thread overview]
Message-ID: <20190514090635.GA21833@mwanda> (raw)
Hello Amit Kucheria,
The patch c80cbb79e851: "drivers: thermal: tsens: Merge tsens-8974
into tsens-v0_1" from Mar 20, 2019, leads to the following static
checker warning:
drivers/thermal/qcom/tsens-v0_1.c:237 calibrate_8974()
warn: mask and shift to zero
drivers/thermal/qcom/tsens-v0_1.c
226 case ONE_PT_CALIB:
227 case ONE_PT_CALIB2:
228 base1 = bkp[0] & BASE1_MASK;
229 p1[0] = (bkp[0] & S0_P1_MASK) >> S0_P1_SHIFT;
230 p1[1] = (bkp[0] & S1_P1_MASK) >> S1_P1_SHIFT;
231 p1[2] = (bkp[0] & S2_P1_MASK) >> S2_P1_SHIFT;
232 p1[3] = (bkp[0] & S3_P1_MASK) >> S3_P1_SHIFT;
233 p1[4] = (bkp[1] & S4_P1_MASK);
234 p1[5] = (bkp[1] & S5_P1_MASK) >> S5_P1_SHIFT;
235 p1[6] = (bkp[1] & S6_P1_MASK) >> S6_P1_SHIFT;
236 p1[7] = (bkp[1] & S7_P1_MASK) >> S7_P1_SHIFT;
237 p1[8] = (bkp[2] & S8_P1_MASK_BKP) >> S8_P1_SHIFT;
^^^^^^^^^^^^^^ ^^^^^^^^^^^
#define S8_P1_MASK_BKP 0x3f
#define S8_P1_SHIFT 24
Other places define S8_P1_SHIFT as 4, so that's maybe something to
consider.
238 p1[9] = (bkp[2] & S9_P1_MASK_BKP) >> S9_P1_BKP_SHIFT;
239 p1[10] = (bkp[2] & S10_P1_MASK_BKP) >> S10_P1_BKP_SHIFT;
240 break;
241 }
242 } else {
243 mode = (calib[1] & CAL_SEL_0_1) >> CAL_SEL_SHIFT;
244 mode |= (calib[3] & CAL_SEL_2) >> CAL_SEL_SHIFT_2;
regards,
dan carpenter
next reply other threads:[~2019-05-14 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 9:06 Dan Carpenter [this message]
2020-07-13 11:44 ` [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1 Dan Carpenter
2021-03-19 19:50 ` Daniel Lezcano
2021-03-22 1:18 ` Thara Gopinath
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=20190514090635.GA21833@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amit.kucheria@linaro.org \
--cc=daniel.lezcano@linaro.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