Skip to contentSkip to conversation

watchdog: imx2_wdt: Improve dev_crit() message

PATCH In review Fabio Estevam 2 participants 2 messages Aug 22, 2023

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 watchdog: imx2_wdt: Improve dev_crit() message

From: Fabio Estevam <[email protected]>

After issuing a "poweroff" command the board goes through the expected power-off sequence and turns it off completely:

systemd-shutdown[1]: Powering off.
imx2-wdt 30280000.watchdog: Device shutdown: Expect reboot!
reboot: Power down

The "Expect reboot!" message is misleading because in the power-off case, no reboot is expected to happen at all.

Avoid the confusion by removing the "Expect reboot!" message.

---
 drivers/watchdog/imx2_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/imx2_wdt.c +1 -1
index 1a27665a2f53..42e8ffae18dd 100644
@@ -374,7 +374,7 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
 		 */
 		imx2_wdt_set_timeout(wdog, IMX2_WDT_MAX_TIME);
 		imx2_wdt_ping(wdog);
-		dev_crit(&pdev->dev, "Device shutdown: Expect reboot!\n");
+		dev_crit(&pdev->dev, "Device shutdown.\n");
 	}
 }
 
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

After issuing a "poweroff" command the board goes through the expected power-off sequence and turns it off completely:

systemd-shutdown[1]: Powering off.
imx2-wdt 30280000.watchdog: Device shutdown: Expect reboot!
reboot: Power down

Quoted 6 lines

The "Expect reboot!" message is misleading because in the power-off case, no reboot is expected to happen at all.

Avoid the confusion by removing the "Expect reboot!" message.

Not sure if the message should be there in the first place. Anyway,

Quoted 20 lines
---
 drivers/watchdog/imx2_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/imx2_wdt.c +1 -1
index 1a27665a2f53..42e8ffae18dd 100644
@@ -374,7 +374,7 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
 		 */
 		imx2_wdt_set_timeout(wdog, IMX2_WDT_MAX_TIME);
 		imx2_wdt_ping(wdog);
-		dev_crit(&pdev->dev, "Device shutdown: Expect reboot!\n");
+		dev_crit(&pdev->dev, "Device shutdown.\n");
 	}
 }
 
Signature · 1 line
2.34.1