Skip to contentSkip to conversation

thermal: imx: Disambiguate the error message

PATCH New Fabio Estevam 1 participant 1 message Mar 22, 2022

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 thermal: imx: Disambiguate the error message

From: Fabio Estevam <[email protected]>

When the "failed to read sensor data" error message is shown, the user does not know if it comes after reading the OCOTP_ANA1 or the OCOTP_MEM0 register.

Disambiguate the error message by adding the register name to it.

---
 drivers/thermal/imx_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/imx_thermal.c +2 -2
index 16663373b682..dbc4bca1b68c 100644
@@ -527,7 +527,7 @@ static int imx_init_from_tempmon_data(struct platform_device *pdev)
 
 	ret = regmap_read(map, OCOTP_ANA1, &val);
 	if (ret) {
-		dev_err(&pdev->dev, "failed to read sensor data: %d\n", ret);
+		dev_err(&pdev->dev, "failed to read OCOTP_ANA1: %d\n", ret);
 		return ret;
 	}
 	ret = imx_init_calib(pdev, val);
@@ -536,7 +536,7 @@ static int imx_init_from_tempmon_data(struct platform_device *pdev)
 
 	ret = regmap_read(map, OCOTP_MEM0, &val);
 	if (ret) {
-		dev_err(&pdev->dev, "failed to read sensor data: %d\n", ret);
+		dev_err(&pdev->dev, "failed to read OCOTP_MEM0: %d\n", ret);
 		return ret;
 	}
 	imx_init_temp_grade(pdev, val);
Signature · 1 line
2.25.1