aboutsummaryrefslogtreecommitdiffstats
path: root/net/can/af_can.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2020-11-20 11:04:44 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2020-11-20 12:04:12 +0100
commitc7b74967799b1af52b3045d69d4c26836b2d41de (patch)
tree8ea93c983077794b4ea8825facfd35c3208da9cb /net/can/af_can.c
parentcan: remove obsolete get_canfd_dlc() macro (diff)
downloadlinux-dev-c7b74967799b1af52b3045d69d4c26836b2d41de.tar.xz
linux-dev-c7b74967799b1af52b3045d69d4c26836b2d41de.zip
can: replace can_dlc as variable/element for payload length
The naming of can_dlc as element of struct can_frame and also as variable name is misleading as it claims to be a 'data length CODE' but in reality it always was a plain data length. With the indroduction of a new 'len' element in struct can_frame we can now remove can_dlc as name and make clear which of the former uses was a plain length (-> 'len') or a data length code (-> 'dlc') value. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201120100444.3199-1-socketcan@hartkopp.net [mkl: gs_usb: keep struct gs_host_frame::can_dlc as is] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can/af_can.c')
-rw-r--r--net/can/af_can.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 5d124c155904..963bd7145517 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -888,7 +888,7 @@ static __init int can_init(void)
int err;
/* check for correct padding to be able to use the structs similarly */
- BUILD_BUG_ON(offsetof(struct can_frame, can_dlc) !=
+ BUILD_BUG_ON(offsetof(struct can_frame, len) !=
offsetof(struct canfd_frame, len) ||
offsetof(struct can_frame, data) !=
offsetof(struct canfd_frame, data));