summaryrefslogtreecommitdiff
path: root/net/can/raw.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2013-01-28 08:33:33 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-28 18:17:25 -0500
commit2bf3440d7b8755f2627232e6a4c37efbbe053685 (patch)
tree07e31649ec6a5d58649f6b3c9f8cd1a76e76b24f /net/can/raw.c
parentcef401de7be8c4e155c6746bfccf721a4fa5fab9 (diff)
can: rework skb reserved data handling
Added accessor and skb_reserve helpers for struct can_skb_priv. Removed pointless skb_headroom() check. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> CC: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can/raw.c')
-rw-r--r--net/can/raw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/can/raw.c b/net/can/raw.c
index 5d860e8dcc52..c1764e41ddaf 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -705,8 +705,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
if (!skb)
goto put_dev;
- skb_reserve(skb, sizeof(struct can_skb_priv));
- ((struct can_skb_priv *)(skb->head))->ifindex = dev->ifindex;
+ can_skb_reserve(skb);
+ can_skb_prv(skb)->ifindex = dev->ifindex;
err = memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size);
if (err < 0)