[PATCH] imx: cpu: terminate line with CR if invalid temp sensor

Tim Harvey tharvey at gateworks.com
Mon Oct 12 21:26:41 CEST 2020


Ensure we terminate the line with a CR if we get an invalid sensor device
or reading.

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 arch/arm/mach-imx/cpu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 4a175cb..a4d8f10 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -223,12 +223,13 @@ int print_cpuinfo(void)
 		ret = thermal_get_temp(thermal_dev, &cpu_tmp);
 
 		if (!ret)
-			printf(" at %dC\n", cpu_tmp);
+			printf(" at %dC", cpu_tmp);
 		else
 			debug(" - invalid sensor data\n");
 	} else {
 		debug(" - invalid sensor device\n");
 	}
+	puts("\n");
 #endif
 
 	printf("Reset cause: %s\n", get_reset_cause());
-- 
2.7.4



More information about the U-Boot mailing list