mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhai Kollara <abhai@protonmail.com>
To: tomeu@tomeuvizoso.net, ogabbay@kernel.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Abhai Kollara <abhai@protonmail.com>
Subject: [PATCH] accel/rocket: use dev_err_probe() for MMIO mapping errors
Date: Fri, 15 May 2026 11:54:07 +0000	[thread overview]
Message-ID: <20260515115335.4104438-1-abhai@protonmail.com> (raw)

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



             reply	other threads:[~2026-05-15 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 11:54 Abhai Kollara [this message]
2026-11-03 22:25 ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260515115335.4104438-1-abhai@protonmail.com \
    --to=abhai@protonmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=tomeu@tomeuvizoso.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®