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>
diff --git a/net/can/raw.c b/net/can/raw.c
index 5d860e8..c1764e4 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -705,8 +705,8 @@
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)