summaryrefslogtreecommitdiff
path: root/net/can/isotp.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2020-10-12 09:43:53 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2020-10-12 10:06:08 +0200
commitac911bfeb34b5d79fb4e23a08b8db0b89c529b53 (patch)
tree7ebea0b9527d9446234a3c831fc69d91aed87246 /net/can/isotp.c
parentbc081a693a56061f68f736c5d596134ee3c87689 (diff)
can: isotp: implement cleanups / improvements from review
As pointed out by Jakub Kicinski here: http://lore.kernel.org/r/20201009175751.5c54097f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com this patch addresses the remarked issues: - remove empty line in comment - remove default=y for CAN_ISOTP in Kconfig - make use of pr_notice_once() - use GFP_ATOMIC instead of gfp_any() in soft hrtimer context The version strings in the CAN subsystem are removed by a separate patch. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201012074354.25839-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can/isotp.c')
-rw-r--r--net/can/isotp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/can/isotp.c b/net/can/isotp.c
index e6ff032b5426..ca63061bb932 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -222,8 +222,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
can_send_ret = can_send(nskb, 1);
if (can_send_ret)
- printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n",
- __func__, can_send_ret);
+ pr_notice_once("can-isotp: %s: can_send_ret %d\n",
+ __func__, can_send_ret);
dev_put(dev);
@@ -769,7 +769,7 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
isotp_tx_burst:
skb = alloc_skb(so->ll.mtu + sizeof(struct can_skb_priv),
- gfp_any());
+ GFP_ATOMIC);
if (!skb) {
dev_put(dev);
break;
@@ -798,8 +798,8 @@ isotp_tx_burst:
can_send_ret = can_send(skb, 1);
if (can_send_ret)
- printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n",
- __func__, can_send_ret);
+ pr_notice_once("can-isotp: %s: can_send_ret %d\n",
+ __func__, can_send_ret);
if (so->tx.idx >= so->tx.len) {
/* we are done */
@@ -942,8 +942,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
err = can_send(skb, 1);
dev_put(dev);
if (err) {
- printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n",
- __func__, err);
+ pr_notice_once("can-isotp: %s: can_send_ret %d\n",
+ __func__, err);
return err;
}