mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] accel/rocket: use dev_err_probe() for MMIO mapping errors
@ 2026-05-15 11:54 Abhai Kollara
  2026-11-03 22:25 ` Heiko Stuebner
  0 siblings, 1 reply; 2+ messages in thread
From: Abhai Kollara @ 2026-05-15 11:54 UTC (permalink / raw)
  To: tomeu, ogabbay; +Cc: dri-devel, linux-kernel, Abhai Kollara

The reset and clock paths in rocket_core_init() already use
dev_err_probe(), but the three devm_platform_ioremap_resource_byname()
calls still open-code dev_err() followed by return PTR_ERR(). Convert
them for consistency. dev_err_probe() additionally silences the
-EPROBE_DEFER noise in dmesg and records the failure reason against
the device, where /sys/kernel/debug/devices_deferred can surface it.

Signed-off-by: Abhai Kollara <abhai@protonmail.com>
---
 drivers/accel/rocket/rocket_core.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/accel/rocket/rocket_core.c b/drivers/accel/rocket/rocket_core.c
index b3b2fa9ba645..1b27a2c2f435 100644
--- a/drivers/accel/rocket/rocket_core.c
+++ b/drivers/accel/rocket/rocket_core.c
@@ -33,22 +33,19 @@ int rocket_core_init(struct rocket_core *core)
 		return dev_err_probe(dev, err, "failed to get clocks for core %d\n", core->index);
 
 	core->pc_iomem = devm_platform_ioremap_resource_byname(pdev, "pc");
-	if (IS_ERR(core->pc_iomem)) {
-		dev_err(dev, "couldn't find PC registers %ld\n", PTR_ERR(core->pc_iomem));
-		return PTR_ERR(core->pc_iomem);
-	}
+	if (IS_ERR(core->pc_iomem))
+		return dev_err_probe(dev, PTR_ERR(core->pc_iomem),
+				     "couldn't find PC registers\n");
 
 	core->cna_iomem = devm_platform_ioremap_resource_byname(pdev, "cna");
-	if (IS_ERR(core->cna_iomem)) {
-		dev_err(dev, "couldn't find CNA registers %ld\n", PTR_ERR(core->cna_iomem));
-		return PTR_ERR(core->cna_iomem);
-	}
+	if (IS_ERR(core->cna_iomem))
+		return dev_err_probe(dev, PTR_ERR(core->cna_iomem),
+				     "couldn't find CNA registers\n");
 
 	core->core_iomem = devm_platform_ioremap_resource_byname(pdev, "core");
-	if (IS_ERR(core->core_iomem)) {
-		dev_err(dev, "couldn't find CORE registers %ld\n", PTR_ERR(core->core_iomem));
-		return PTR_ERR(core->core_iomem);
-	}
+	if (IS_ERR(core->core_iomem))
+		return dev_err_probe(dev, PTR_ERR(core->core_iomem),
+				     "couldn't find CORE registers\n");
 
 	dma_set_max_seg_size(dev, UINT_MAX);
 
-- 
2.43.0



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

* Re: [PATCH] accel/rocket: use dev_err_probe() for MMIO mapping errors
  2026-05-15 11:54 [PATCH] accel/rocket: use dev_err_probe() for MMIO mapping errors Abhai Kollara
@ 2026-11-03 22:25 ` Heiko Stuebner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2026-11-03 22:25 UTC (permalink / raw)
  To: tomeu, ogabbay, Abhai Kollara; +Cc: Heiko Stuebner, dri-devel, linux-kernel


On Fri, 15 May 2026 11:54:07 +0000, Abhai Kollara wrote:
> The reset and clock paths in rocket_core_init() already use
> dev_err_probe(), but the three devm_platform_ioremap_resource_byname()
> calls still open-code dev_err() followed by return PTR_ERR(). Convert
> them for consistency. dev_err_probe() additionally silences the
> -EPROBE_DEFER noise in dmesg and records the failure reason against
> the device, where /sys/kernel/debug/devices_deferred can surface it.
> 
> [...]

Applied, thanks!

[1/1] accel/rocket: use dev_err_probe() for MMIO mapping errors
      commit: 49f40f15d20f5b4073d517da7efbcea079f1b9e3

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

end of thread, other threads:[~2026-11-03 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-15 11:54 [PATCH] accel/rocket: use dev_err_probe() for MMIO mapping errors Abhai Kollara
2026-11-03 22:25 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®