[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHLCerODxv9jAhDPLHSHRVvsmPtBvj2X-CzFcFo1Vc7EZF+9og@mail.gmail.com>
Date: Thu, 19 Mar 2020 14:24:44 +0530
From: Amit Kucheria <amit.kucheria@...durent.com>
To: Anson Huang <Anson.Huang@....com>
Cc: Zhang Rui <rui.zhang@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>, kernel@...gutronix.de,
Fabio Estevam <festevam@...il.com>,
Linux PM list <linux-pm@...r.kernel.org>,
lakml <linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>, Linux-imx@....com
Subject: Re: [PATCH] thermal: imx_sc_thermal: Fix incorrect data type
On Thu, Mar 19, 2020 at 2:03 PM Anson Huang <Anson.Huang@....com> wrote:
>
> 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@....com>
Reviewed-by: Amit Kucheria <amit.kucheria@...aro.org>
> ---
> 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
>
Powered by blists - more mailing lists