Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: bcm: use CAN frame instead of can_frame in comments

can_frame is the name of the struct can_frame which is not meant in
the corrected comments.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Oliver Hartkopp and committed by
Marc Kleine-Budde
72c8a89a 95acb490

+16 -16
+16 -16
net/can/bcm.c
··· 84 84 MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>"); 85 85 MODULE_ALIAS("can-proto-2"); 86 86 87 - /* easy access to can_frame payload */ 87 + /* easy access to CAN frame payload */ 88 88 static inline u64 GET_U64(const struct can_frame *cp) 89 89 { 90 90 return *(u64 *)cp->data; ··· 305 305 memcpy(skb_put(skb, sizeof(*head)), head, sizeof(*head)); 306 306 307 307 if (head->nframes) { 308 - /* can_frames starting here */ 308 + /* CAN frames starting here */ 309 309 firstframe = (struct can_frame *)skb_tail_pointer(skb); 310 310 311 311 memcpy(skb_put(skb, datalen), frames, datalen); 312 312 313 313 /* 314 - * the BCM uses the can_dlc-element of the can_frame 314 + * the BCM uses the can_dlc-element of the CAN frame 315 315 * structure for internal purposes. This is only 316 316 * relevant for updates that are generated by the 317 317 * BCM, where nframes is 1 ··· 492 492 return; 493 493 } 494 494 495 - /* do a real check in can_frame data section */ 495 + /* do a real check in CAN frame data section */ 496 496 497 497 if ((GET_U64(&op->frames[index]) & GET_U64(rxdata)) != 498 498 (GET_U64(&op->frames[index]) & GET_U64(&op->last_frames[index]))) { ··· 501 501 } 502 502 503 503 if (op->flags & RX_CHECK_DLC) { 504 - /* do a real check in can_frame dlc */ 504 + /* do a real check in CAN frame dlc */ 505 505 if (rxdata->can_dlc != (op->last_frames[index].can_dlc & 506 506 BCM_CAN_DLC_MASK)) { 507 507 bcm_rx_update_and_send(op, &op->last_frames[index], ··· 554 554 555 555 /* if user wants to be informed, when cyclic CAN-Messages come back */ 556 556 if ((op->flags & RX_ANNOUNCE_RESUME) && op->last_frames) { 557 - /* clear received can_frames to indicate 'nothing received' */ 557 + /* clear received CAN frames to indicate 'nothing received' */ 558 558 memset(op->last_frames, 0, op->nframes * CFSIZ); 559 559 } 560 560 ··· 840 840 if (!ifindex) 841 841 return -ENODEV; 842 842 843 - /* check nframes boundaries - we need at least one can_frame */ 843 + /* check nframes boundaries - we need at least one CAN frame */ 844 844 if (msg_head->nframes < 1 || msg_head->nframes > MAX_NFRAMES) 845 845 return -EINVAL; 846 846 ··· 851 851 /* update existing BCM operation */ 852 852 853 853 /* 854 - * Do we need more space for the can_frames than currently 854 + * Do we need more space for the CAN frames than currently 855 855 * allocated? -> This is a _really_ unusual use-case and 856 856 * therefore (complexity / locking) it is not supported. 857 857 */ 858 858 if (msg_head->nframes > op->nframes) 859 859 return -E2BIG; 860 860 861 - /* update can_frames content */ 861 + /* update CAN frames content */ 862 862 for (i = 0; i < msg_head->nframes; i++) { 863 863 err = memcpy_from_msg((u8 *)&op->frames[i], msg, CFSIZ); 864 864 ··· 883 883 884 884 op->can_id = msg_head->can_id; 885 885 886 - /* create array for can_frames and copy the data */ 886 + /* create array for CAN frames and copy the data */ 887 887 if (msg_head->nframes > 1) { 888 888 op->frames = kmalloc(msg_head->nframes * CFSIZ, 889 889 GFP_KERNEL); ··· 966 966 967 967 if (op->flags & STARTTIMER) { 968 968 hrtimer_cancel(&op->timer); 969 - /* spec: send can_frame when starting timer */ 969 + /* spec: send CAN frame when starting timer */ 970 970 op->flags |= TX_ANNOUNCE; 971 971 } 972 972 ··· 1015 1015 /* update existing BCM operation */ 1016 1016 1017 1017 /* 1018 - * Do we need more space for the can_frames than currently 1018 + * Do we need more space for the CAN frames than currently 1019 1019 * allocated? -> This is a _really_ unusual use-case and 1020 1020 * therefore (complexity / locking) it is not supported. 1021 1021 */ ··· 1023 1023 return -E2BIG; 1024 1024 1025 1025 if (msg_head->nframes) { 1026 - /* update can_frames content */ 1026 + /* update CAN frames content */ 1027 1027 err = memcpy_from_msg((u8 *)op->frames, msg, 1028 1028 msg_head->nframes * CFSIZ); 1029 1029 if (err < 0) ··· 1048 1048 op->nframes = msg_head->nframes; 1049 1049 1050 1050 if (msg_head->nframes > 1) { 1051 - /* create array for can_frames and copy the data */ 1051 + /* create array for CAN frames and copy the data */ 1052 1052 op->frames = kmalloc(msg_head->nframes * CFSIZ, 1053 1053 GFP_KERNEL); 1054 1054 if (!op->frames) { ··· 1056 1056 return -ENOMEM; 1057 1057 } 1058 1058 1059 - /* create and init array for received can_frames */ 1059 + /* create and init array for received CAN frames */ 1060 1060 op->last_frames = kzalloc(msg_head->nframes * CFSIZ, 1061 1061 GFP_KERNEL); 1062 1062 if (!op->last_frames) { ··· 1327 1327 break; 1328 1328 1329 1329 case TX_SEND: 1330 - /* we need exactly one can_frame behind the msg head */ 1330 + /* we need exactly one CAN frame behind the msg head */ 1331 1331 if ((msg_head.nframes != 1) || (size != CFSIZ + MHSIZ)) 1332 1332 ret = -EINVAL; 1333 1333 else