Commit 46d8657a authored by Patrick Menschel's avatar Patrick Menschel Committed by Marc Kleine-Budde

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.deSigned-off-by: default avatarPatrick Menschel <menschel.p@posteo.de>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 24a774a4
...@@ -221,8 +221,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus) ...@@ -221,8 +221,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
can_send_ret = can_send(nskb, 1); can_send_ret = can_send(nskb, 1);
if (can_send_ret) if (can_send_ret)
pr_notice_once("can-isotp: %s: can_send_ret %d\n", pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
__func__, can_send_ret); __func__, ERR_PTR(can_send_ret));
dev_put(dev); dev_put(dev);
...@@ -798,8 +798,8 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer) ...@@ -798,8 +798,8 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
can_send_ret = can_send(skb, 1); can_send_ret = can_send(skb, 1);
if (can_send_ret) if (can_send_ret)
pr_notice_once("can-isotp: %s: can_send_ret %d\n", pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
__func__, can_send_ret); __func__, ERR_PTR(can_send_ret));
if (so->tx.idx >= so->tx.len) { if (so->tx.idx >= so->tx.len) {
/* we are done */ /* we are done */
...@@ -946,8 +946,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) ...@@ -946,8 +946,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
err = can_send(skb, 1); err = can_send(skb, 1);
dev_put(dev); dev_put(dev);
if (err) { if (err) {
pr_notice_once("can-isotp: %s: can_send_ret %d\n", pr_notice_once("can-isotp: %s: can_send_ret %pe\n",
__func__, err); __func__, ERR_PTR(err));
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment