thermal: imx_sc_thermal: Fix incorrect data type
Subsystems (2)
PATCH 1/1 thermal: imx_sc_thermal: Fix incorrect data type
The temperature value passed from SCU could be negative value, the data type should be signed instead of unsigned.
Fixes ed0843633fee ("thermal: imx_sc: add i.MX system controller thermal support")
Signed-off-by Anson Huang <[email protected]>
--- drivers/thermal/imx_sc_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/imx_sc_thermal.c +2 -2
@@ -30,8 +30,8 @@ struct req_get_temp { } __packed__aligned(4) ;struct resp_get_temp { -u16 celsius; -u8 tenths; +s16 celsius; +s8 tenths; } __packed__aligned(4) ;struct imx_sc_msg_misc_get_temp {
Signature · 1 line
2.7.4
Quoted 6 lines · Anson Huang
The temperature value passed from SCU could be negative value, the data type should be signed instead of unsigned.
Fixes ed0843633fee ("thermal: imx_sc: add i.MX system controller thermal support")Signed-off-by Anson Huang <[email protected]>
Reviewed-by Amit Kucheria <[email protected]>
Quoted 22 lines
--- drivers/thermal/imx_sc_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/thermal/imx_sc_thermal.c +2
-3@@ -30,8 +30,8 @@ struct req_get_temp { } __packed__aligned(4) ;struct resp_get_temp { -u16 celsius; -u8 tenths; +s16 celsius; +s8 tenths; } __packed__aligned(4) ;struct imx_sc_msg_misc_get_temp { --2.7.4
Daniel Lezcano
AppliedQuoted 5 lines · Anson Huang
The temperature value passed from SCU could be negative value, the data type should be signed instead of unsigned.
Fixes ed0843633fee ("thermal: imx_sc: add i.MX system controller thermal support")Signed-off-by Anson Huang <[email protected]>
Applied, thanks
Quoted 20 lines
--- drivers/thermal/imx_sc_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/thermal/imx_sc_thermal.c +2
-2@@ -30,8 +30,8 @@ struct req_get_temp { } __packed__aligned(4) ;struct resp_get_temp { -u16 celsius; -u8 tenths; +s16 celsius; +s8 tenths; } __packed__aligned(4) ;struct imx_sc_msg_misc_get_temp {
Signature · 11 lines
<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 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel