From: Fabio Estevam Date: Wed, 23 Aug 2023 17:59:10 +0000 (-0300) Subject: thermal: imx_tmu: Fix the temperature unit X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=f4898e4b0ede5929cc1706d0da498d63375b1129;p=u-boot.git thermal: imx_tmu: Fix the temperature unit The temperature unit is millidegree Celsius, so divide by 1000 to correctly print the temperature values in Celsius. While at it, also change a typo: "has beyond" to "is beyond". Signed-off-by: Fabio Estevam --- diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c index d2ea084d2d..b877ee3687 100644 --- a/drivers/thermal/imx_tmu.c +++ b/drivers/thermal/imx_tmu.c @@ -238,8 +238,8 @@ int imx_tmu_get_temp(struct udevice *dev, int *temp) return ret; while (cpu_tmp >= pdata->alert) { - dev_crit(dev, "CPU Temperature (%dC) has beyond alert (%dC), close to critical (%dC) waiting...\n", - cpu_tmp, pdata->alert, pdata->critical); + dev_crit(dev, "CPU Temperature (%dC) is beyond alert (%dC), close to critical (%dC) waiting...\n", + cpu_tmp / 1000, pdata->alert / 1000, pdata->critical / 1000); mdelay(pdata->polling_delay); ret = read_temperature(dev, &cpu_tmp); if (ret)