Skip to contentSkip to conversation

power: reset: nvmem-reboot-mode: quiet some device deferrals

PATCH Applied Andrew Halaney 3 participants 3 messages Aug 17, 2023 – Sep 12, 2023 System reset/shutdown drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: reset: nvmem-reboot-mode: quiet some device deferrals

Some errors are being logged that are really due to deferrals, which is confusing to users. Use dev_err_probe() to handle when to log at error level versus debug. This also has the added bonuses of logging to devices_deferred and printing the error value.

---
 drivers/power/reset/nvmem-reboot-mode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/reset/nvmem-reboot-mode.c +2 -2
index e229308d43e2..41530b70cfc4 100644
@@ -45,8 +45,8 @@ static int nvmem_reboot_mode_probe(struct platform_device *pdev)
 
 	nvmem_rbm->cell = devm_nvmem_cell_get(&pdev->dev, "reboot-mode");
 	if (IS_ERR(nvmem_rbm->cell)) {
-		dev_err(&pdev->dev, "failed to get the nvmem cell reboot-mode\n");
-		return PTR_ERR(nvmem_rbm->cell);
+		return dev_err_probe(&pdev->dev, PTR_ERR(nvmem_rbm->cell),
+				     "failed to get the nvmem cell reboot-mode\n");
 	}
 
 	ret = devm_reboot_mode_register(&pdev->dev, &nvmem_rbm->reboot);
Signature · 1 line
2.41.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andrew Halaney

Some errors are being logged that are really due to deferrals, which is confusing to users. Use dev_err_probe() to handle when to log at error level versus debug. This also has the added bonuses of logging to devices_deferred and printing the error value.

#2 lore raw
In reply to Andrew Halaney
Quoted 6 lines · Andrew Halaney

Some errors are being logged that are really due to deferrals, which is confusing to users. Use dev_err_probe() to handle when to log at error level versus debug. This also has the added bonuses of logging to devices_deferred and printing the error value.

Applied, thanks!

[1/1] power: reset: nvmem-reboot-mode: quiet some device deferrals

      commit: 8e511f42ac9cdab84c692bcd0f9e0c55c75b1856

Best regards,

Signature · 1 line
Sebastian Reichel <[email protected]>