* [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
@ 2019-05-14 9:06 Dan Carpenter
2020-07-13 11:44 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2019-05-14 9:06 UTC (permalink / raw)
To: amit.kucheria; +Cc: Daniel Lezcano, linux-pm
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
2019-05-14 9:06 [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1 Dan Carpenter
@ 2020-07-13 11:44 ` Dan Carpenter
2021-03-19 19:50 ` Daniel Lezcano
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2020-07-13 11:44 UTC (permalink / raw)
To: amit.kucheria; +Cc: Daniel Lezcano, linux-pm
Did we ever look into this?
regards,
dan carpenter
On Tue, May 14, 2019 at 12:06:35PM +0300, Dan Carpenter wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
2020-07-13 11:44 ` Dan Carpenter
@ 2021-03-19 19:50 ` Daniel Lezcano
2021-03-22 1:18 ` Thara Gopinath
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2021-03-19 19:50 UTC (permalink / raw)
To: amit.kucheria; +Cc: Dan Carpenter, linux-pm, Thara Gopinath
On 13/07/2020 13:44, Dan Carpenter wrote:
> Did we ever look into this?
Thara,
is it possible to have a look at this bug report?
Thanks
-- Daniel
> regards,
> dan carpenter
>
> On Tue, May 14, 2019 at 12:06:35PM +0300, Dan Carpenter wrote:
>> 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
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1
2021-03-19 19:50 ` Daniel Lezcano
@ 2021-03-22 1:18 ` Thara Gopinath
0 siblings, 0 replies; 4+ messages in thread
From: Thara Gopinath @ 2021-03-22 1:18 UTC (permalink / raw)
To: Daniel Lezcano, amit.kucheria; +Cc: Dan Carpenter, linux-pm
On 3/19/21 3:50 PM, Daniel Lezcano wrote:
> On 13/07/2020 13:44, Dan Carpenter wrote:
>> Did we ever look into this?
>
> Thara,
>
> is it possible to have a look at this bug report?
Sure! In a few weeks..
>
> Thanks
>
> -- Daniel
>
>> regards,
>> dan carpenter
>>
>> On Tue, May 14, 2019 at 12:06:35PM +0300, Dan Carpenter wrote:
>>> 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
>
>
--
Warm Regards
Thara
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-22 1:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-14 9:06 [bug report] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1 Dan Carpenter
2020-07-13 11:44 ` Dan Carpenter
2021-03-19 19:50 ` Daniel Lezcano
2021-03-22 1:18 ` Thara Gopinath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox