summaryrefslogtreecommitdiffstats
path: root/net/can/bcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/can/bcm.c')
-rw-r--r--net/can/bcm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 65432633a250..47a8748d953a 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -282,7 +282,7 @@ static void bcm_can_tx(struct bcm_op *op)
282 can_skb_prv(skb)->ifindex = dev->ifindex; 282 can_skb_prv(skb)->ifindex = dev->ifindex;
283 can_skb_prv(skb)->skbcnt = 0; 283 can_skb_prv(skb)->skbcnt = 0;
284 284
285 memcpy(skb_put(skb, op->cfsiz), cf, op->cfsiz); 285 skb_put_data(skb, cf, op->cfsiz);
286 286
287 /* send with loopback */ 287 /* send with loopback */
288 skb->dev = dev; 288 skb->dev = dev;
@@ -318,13 +318,13 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
318 if (!skb) 318 if (!skb)
319 return; 319 return;
320 320
321 memcpy(skb_put(skb, sizeof(*head)), head, sizeof(*head)); 321 skb_put_data(skb, head, sizeof(*head));
322 322
323 if (head->nframes) { 323 if (head->nframes) {
324 /* CAN frames starting here */ 324 /* CAN frames starting here */
325 firstframe = (struct canfd_frame *)skb_tail_pointer(skb); 325 firstframe = (struct canfd_frame *)skb_tail_pointer(skb);
326 326
327 memcpy(skb_put(skb, datalen), frames, datalen); 327 skb_put_data(skb, frames, datalen);
328 328
329 /* 329 /*
330 * the BCM uses the flags-element of the canfd_frame 330 * the BCM uses the flags-element of the canfd_frame