git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa2c414
)
cpu: imx8_cpu: Provide default temperatures
author
Andrew Goodbody
<andrew.goodbody@linaro.org>
Thu, 24 Jul 2025 14:46:49 +0000
(15:46 +0100)
committer
Fabio Estevam
<festevam@gmail.com>
Thu, 7 Aug 2025 11:15:00 +0000
(08:15 -0300)
Add setting default temperatures to the weak version of
get_cpu_temp_grade so these values will not be used uninitialised.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/cpu/imx8_cpu.c
patch
|
blob
|
history
diff --git
a/drivers/cpu/imx8_cpu.c
b/drivers/cpu/imx8_cpu.c
index
4836bdd
..
9506304
100644
(file)
--- a/
drivers/cpu/imx8_cpu.c
+++ b/
drivers/cpu/imx8_cpu.c
@@
-201,6
+201,10
@@
static int cpu_imx_get_temp(struct cpu_imx_plat *plat)
__weak u32 get_cpu_temp_grade(int *minc, int *maxc)
{
+ if (minc && maxc) {
+ *minc = 0;
+ *maxc = 95;
+ }
return 0;
}