linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: reset: nvmem-reboot-mode: quiet some device deferrals
@ 2023-08-17 21:41 Andrew Halaney
  2023-08-17 23:40 ` Brian Masney
  2023-09-12 18:16 ` Sebastian Reichel
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Halaney @ 2023-08-17 21:41 UTC (permalink / raw)
  To: sre; +Cc: linux-kernel, linux-pm, bmasney, 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.

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
 drivers/power/reset/nvmem-reboot-mode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/reset/nvmem-reboot-mode.c b/drivers/power/reset/nvmem-reboot-mode.c
index e229308d43e2..41530b70cfc4 100644
--- a/drivers/power/reset/nvmem-reboot-mode.c
+++ b/drivers/power/reset/nvmem-reboot-mode.c
@@ -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);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] power: reset: nvmem-reboot-mode: quiet some device deferrals
  2023-08-17 21:41 [PATCH] power: reset: nvmem-reboot-mode: quiet some device deferrals Andrew Halaney
@ 2023-08-17 23:40 ` Brian Masney
  2023-09-12 18:16 ` Sebastian Reichel
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Masney @ 2023-08-17 23:40 UTC (permalink / raw)
  To: Andrew Halaney; +Cc: sre, linux-kernel, linux-pm

On Thu, Aug 17, 2023 at 04:41:57PM -0500, Andrew Halaney wrote:
> 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.
> 
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>
Tested-by: Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] power: reset: nvmem-reboot-mode: quiet some device deferrals
  2023-08-17 21:41 [PATCH] power: reset: nvmem-reboot-mode: quiet some device deferrals Andrew Halaney
  2023-08-17 23:40 ` Brian Masney
@ 2023-09-12 18:16 ` Sebastian Reichel
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2023-09-12 18:16 UTC (permalink / raw)
  To: sre, Andrew Halaney; +Cc: linux-kernel, linux-pm, bmasney


On Thu, 17 Aug 2023 16:41:57 -0500, Andrew Halaney wrote:
> 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,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-12 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 21:41 [PATCH] power: reset: nvmem-reboot-mode: quiet some device deferrals Andrew Halaney
2023-08-17 23:40 ` Brian Masney
2023-09-12 18:16 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).