Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] thermal: imx_sc_thermal: Fix incorrect data type
@ 2020-03-19  8:26 Anson Huang
  2020-03-19  8:54 ` Amit Kucheria
  2020-03-19 11:55 ` Daniel Lezcano
  0 siblings, 2 replies; 3+ messages in thread
From: Anson Huang @ 2020-03-19  8:26 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, amit.kucheria, shawnguo, s.hauer,
	kernel, festevam, linux-pm, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

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 <Anson.Huang@nxp.com>
---
 drivers/thermal/imx_sc_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index dbb277a..a8723b1 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-19 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-19  8:26 [PATCH] thermal: imx_sc_thermal: Fix incorrect data type Anson Huang
2020-03-19  8:54 ` Amit Kucheria
2020-03-19 11:55 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox