summaryrefslogtreecommitdiffstats
path: root/net/can
diff options
context:
space:
mode:
authorPatrick Menschel <menschel.p@posteo.de>2021-04-27 05:21:47 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-05-27 09:42:21 +0200
commit46d8657a6b284e32b6b3bf1a6c93ee507fdd3cdb (patch)
tree1e5aba0f32113542a5de79e0a86d9b8ae60c78f8 /net/can
parent24a774a4f9750ecd37d7aaeacfc04a844b9cf20b (diff)
downloadlinux-46d8657a6b284e32b6b3bf1a6c93ee507fdd3cdb.tar.bz2
can: isotp: change error format from decimal to symbolic error names
This patch changes the format string for errors from decimal %d to symbolic error names %pe to achieve more comprehensive log messages. Link: https://lore.kernel.org/r/20210427052150.2308-2-menschel.p@posteo.de Signed-off-by: Patrick Menschel <menschel.p@posteo.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can')
-rw-r--r--net/can/isotp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/can/isotp.c b/net/can/isotp.c
index 9f94ad3caee9..2c4f84fac70a 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -221,8 +221,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
can_send_ret = can_send(nskb, 1);
if (can_send_ret)
- pr_notice_once("can-isotp: %s: can_send_ret %d\n",
- __func__, can_send_ret);
+ pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
+ __func__, ERR_PTR(can_send_ret));
dev_put(dev);
@@ -798,8 +798,8 @@ isotp_tx_burst:
can_send_ret = can_send(skb, 1);
if (can_send_ret)
- pr_notice_once("can-isotp: %s: can_send_ret %d\n",
- __func__, can_send_ret);
+ pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
+ __func__, ERR_PTR(can_send_ret));
if (so->tx.idx >= so->tx.len) {
/* we are done */
@@ -946,8 +946,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
err = can_send(skb, 1);
dev_put(dev);
if (err) {
- pr_notice_once("can-isotp: %s: can_send_ret %d\n",
- __func__, err);
+ pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
+ __func__, ERR_PTR(err));
return err;
}