From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: linux-can@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2 11/11] can: rcar_can: Convert to %pe
Date: Fri, 22 Aug 2025 12:17:12 +0200 [thread overview]
Message-ID: <adb2dc49c78b45191de410f645a5e423d341f94e.1755857536.git.geert+renesas@glider.be> (raw)
In-Reply-To: <cover.1755857536.git.geert+renesas@glider.be>
Replace numerical error codes by mnemotechnic error codes, to improve
the user experience in case of errors.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- New.
---
drivers/net/can/rcar/rcar_can.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c
index 51bf8f7e71824ac8..5f85f4e272054789 100644
--- a/drivers/net/can/rcar/rcar_can.c
+++ b/drivers/net/can/rcar/rcar_can.c
@@ -521,20 +521,20 @@ static int rcar_can_open(struct net_device *ndev)
}
err = clk_prepare_enable(priv->can_clk);
if (err) {
- netdev_err(ndev, "failed to enable CAN clock, error %d\n",
- err);
+ netdev_err(ndev, "failed to enable CAN clock: %pe\n",
+ ERR_PTR(err));
goto out_rpm;
}
err = open_candev(ndev);
if (err) {
- netdev_err(ndev, "open_candev() failed, error %d\n", err);
+ netdev_err(ndev, "open_candev() failed %pe\n", ERR_PTR(err));
goto out_can_clock;
}
napi_enable(&priv->napi);
err = request_irq(ndev->irq, rcar_can_interrupt, 0, ndev->name, ndev);
if (err) {
- netdev_err(ndev, "request_irq(%d) failed, error %d\n",
- ndev->irq, err);
+ netdev_err(ndev, "request_irq(%d) failed %pe\n", ndev->irq,
+ ERR_PTR(err));
goto out_close;
}
rcar_can_start(ndev);
@@ -786,8 +786,8 @@ static int rcar_can_probe(struct platform_device *pdev)
}
priv->can_clk = devm_clk_get(dev, clock_names[clock_select]);
if (IS_ERR(priv->can_clk)) {
+ dev_err(dev, "cannot get CAN clock: %pe\n", priv->can_clk);
err = PTR_ERR(priv->can_clk);
- dev_err(dev, "cannot get CAN clock, error %d\n", err);
goto fail_clk;
}
@@ -813,7 +813,7 @@ static int rcar_can_probe(struct platform_device *pdev)
err = register_candev(ndev);
if (err) {
- dev_err(dev, "register_candev() failed, error %d\n", err);
+ dev_err(dev, "register_candev() failed %pe\n", ERR_PTR(err));
goto fail_rpm;
}
--
2.43.0
next prev parent reply other threads:[~2025-08-22 10:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 10:17 [PATCH v2 00/11] can: rcar_can: Miscellaneous cleanups and improvements Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 01/11] can: rcar_can: Consistently use ndev for net_device pointers Geert Uytterhoeven
2025-08-22 14:28 ` Biju Das
2025-08-22 10:17 ` [PATCH v2 02/11] can: rcar_can: Add helper variable dev to rcar_can_probe() Geert Uytterhoeven
2025-08-22 14:29 ` Biju Das
2025-08-22 10:17 ` [PATCH v2 03/11] can: rcar_can: Convert to Runtime PM Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 04/11] can: rcar_can: Convert to BIT() Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 05/11] can: rcar_can: Convert to GENMASK() Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 06/11] can: rcar_can: CTLR bitfield conversion Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 07/11] can: rcar_can: TFCR " Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 08/11] can: rcar_can: BCR " Geert Uytterhoeven
2025-08-22 14:38 ` Biju Das
2025-08-22 10:17 ` [PATCH v2 09/11] can: rcar_can: Mailbox " Geert Uytterhoeven
2025-08-22 10:17 ` [PATCH v2 10/11] can: rcar_can: Do not print alloc_candev() failures Geert Uytterhoeven
2025-08-22 14:42 ` Biju Das
2025-08-22 10:17 ` Geert Uytterhoeven [this message]
2025-08-22 14:43 ` [PATCH v2 11/11] can: rcar_can: Convert to %pe Biju Das
2025-09-19 17:26 ` [PATCH v2 00/11] can: rcar_can: Miscellaneous cleanups and improvements Marc Kleine-Budde
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=adb2dc49c78b45191de410f645a5e423d341f94e.1755857536.git.geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=linux-can@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).