History

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.

Oliver Hartkopp committed 10 years ago

Commit 72c8a891 parent 95acb491 file · +16 −16Browse files

Unified · Split

net/can/bcm.c+16−16
@@ -84,7 +84,7 @@ MODULE_LICENSE("Dual BSD/GPL"); · 83 unmodified lines
8484 MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
8585 MODULE_ALIAS("can-proto-2");
8686
87−/* easy access to can_frame payload */
87+/* easy access to CAN frame payload */
8888 static inline u64 GET_U64(const struct can_frame *cp)
8989 {
9090 return *(u64 *)cp->data;
@@ -305,13 +305,13 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head, · 214 unmodified lines
305305 memcpy(skb_put(skb, sizeof(*head)), head, sizeof(*head));
306306
307307 if (head->nframes) {
308− /* can_frames starting here */
308+ /* CAN frames starting here */
309309 firstframe = (struct can_frame *)skb_tail_pointer(skb);
310310
311311 memcpy(skb_put(skb, datalen), frames, datalen);
312312
313313 /*
314− * the BCM uses the can_dlc-element of the can_frame
314+ * the BCM uses the can_dlc-element of the CAN frame
315315 * structure for internal purposes. This is only
316316 * relevant for updates that are generated by the
317317 * BCM, where nframes is 1
@@ -492,7 +492,7 @@ static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index, · 174 unmodified lines
492492 return;
493493 }
494494
495− /* do a real check in can_frame data section */
495+ /* do a real check in CAN frame data section */
496496
497497 if ((GET_U64(&op->frames[index]) & GET_U64(rxdata)) !=
498498 (GET_U64(&op->frames[index]) & GET_U64(&op->last_frames[index]))) {
@@ -501,7 +501,7 @@ static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index, · 2 unmodified lines
501501 }
502502
503503 if (op->flags & RX_CHECK_DLC) {
504− /* do a real check in can_frame dlc */
504+ /* do a real check in CAN frame dlc */
505505 if (rxdata->can_dlc != (op->last_frames[index].can_dlc &
506506 BCM_CAN_DLC_MASK)) {
507507 bcm_rx_update_and_send(op, &op->last_frames[index],
@@ -554,7 +554,7 @@ static enum hrtimer_restart bcm_rx_timeout_handler(struct hrtimer *hrtimer) · 46 unmodified lines
554554
555555 /* if user wants to be informed, when cyclic CAN-Messages come back */
556556 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' */
558558 memset(op->last_frames, 0, op->nframes * CFSIZ);
559559 }
560560
@@ -840,7 +840,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 279 unmodified lines
840840 if (!ifindex)
841841 return -ENODEV;
842842
843− /* check nframes boundaries - we need at least one can_frame */
843+ /* check nframes boundaries - we need at least one CAN frame */
844844 if (msg_head->nframes < 1 || msg_head->nframes > MAX_NFRAMES)
845845 return -EINVAL;
846846
@@ -851,14 +851,14 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 4 unmodified lines
851851 /* update existing BCM operation */
852852
853853 /*
854− * Do we need more space for the can_frames than currently
854+ * Do we need more space for the CAN frames than currently
855855 * allocated? -> This is a _really_ unusual use-case and
856856 * therefore (complexity / locking) it is not supported.
857857 */
858858 if (msg_head->nframes > op->nframes)
859859 return -E2BIG;
860860
861− /* update can_frames content */
861+ /* update CAN frames content */
862862 for (i = 0; i < msg_head->nframes; i++) {
863863 err = memcpy_from_msg((u8 *)&op->frames[i], msg, CFSIZ);
864864
@@ -883,7 +883,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 18 unmodified lines
883883
884884 op->can_id = msg_head->can_id;
885885
886− /* create array for can_frames and copy the data */
886+ /* create array for CAN frames and copy the data */
887887 if (msg_head->nframes > 1) {
888888 op->frames = kmalloc(msg_head->nframes * CFSIZ,
889889 GFP_KERNEL);
@@ -966,7 +966,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 76 unmodified lines
966966
967967 if (op->flags & STARTTIMER) {
968968 hrtimer_cancel(&op->timer);
969− /* spec: send can_frame when starting timer */
969+ /* spec: send CAN frame when starting timer */
970970 op->flags |= TX_ANNOUNCE;
971971 }
972972
@@ -1015,7 +1015,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 42 unmodified lines
10151015 /* update existing BCM operation */
10161016
10171017 /*
1018− * Do we need more space for the can_frames than currently
1018+ * Do we need more space for the CAN frames than currently
10191019 * allocated? -> This is a _really_ unusual use-case and
10201020 * therefore (complexity / locking) it is not supported.
10211021 */
@@ -1023,7 +1023,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 1 unmodified line
10231023 return -E2BIG;
10241024
10251025 if (msg_head->nframes) {
1026− /* update can_frames content */
1026+ /* update CAN frames content */
10271027 err = memcpy_from_msg((u8 *)op->frames, msg,
10281028 msg_head->nframes * CFSIZ);
10291029 if (err < 0)
@@ -1048,7 +1048,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 18 unmodified lines
10481048 op->nframes = msg_head->nframes;
10491049
10501050 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 */
10521052 op->frames = kmalloc(msg_head->nframes * CFSIZ,
10531053 GFP_KERNEL);
10541054 if (!op->frames) {
@@ -1056,7 +1056,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, · 1 unmodified line
10561056 return -ENOMEM;
10571057 }
10581058
1059− /* create and init array for received can_frames */
1059+ /* create and init array for received CAN frames */
10601060 op->last_frames = kzalloc(msg_head->nframes * CFSIZ,
10611061 GFP_KERNEL);
10621062 if (!op->last_frames) {
@@ -1327,7 +1327,7 @@ static int bcm_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) · 264 unmodified lines
13271327 break;
13281328
13291329 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 */
13311331 if ((msg_head.nframes != 1) || (size != CFSIZ + MHSIZ))
13321332 ret = -EINVAL;
13331333 else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t