summaryrefslogtreecommitdiff
path: root/drivers/net/can/rcar
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2020-11-10 13:18:49 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2020-11-20 14:05:14 +0300
commit3ab4ce0d6fa8c93d41df4a74ec8d2c9198be2109 (patch)
tree9d05569f468555c916dfde7e19f0eb73ef8e0582 /drivers/net/can/rcar
parentc7b74967799b1af52b3045d69d4c26836b2d41de (diff)
downloadlinux-3ab4ce0d6fa8c93d41df4a74ec8d2c9198be2109.tar.xz
can: rename CAN FD related can_len2dlc and can_dlc2len helpers
The helper functions can_len2dlc and can_dlc2len are only relevant for CAN FD data length code (DLC) conversion. To fit the introduced can_cc_dlc2len for Classical CAN we rename: can_dlc2len -> can_fd_dlc2len to get the payload length from the DLC can_len2dlc -> can_fd_len2dlc to get the DLC from the payload length Suggested-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201110101852.1973-6-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/rcar')
-rw-r--r--drivers/net/can/rcar/rcar_canfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index 86c6cbdb7e53..2778ed5c61d1 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -1357,7 +1357,7 @@ static netdev_tx_t rcar_canfd_start_xmit(struct sk_buff *skb,
if (cf->can_id & CAN_RTR_FLAG)
id |= RCANFD_CFID_CFRTR;
- dlc = RCANFD_CFPTR_CFDLC(can_len2dlc(cf->len));
+ dlc = RCANFD_CFPTR_CFDLC(can_fd_len2dlc(cf->len));
if (priv->can.ctrlmode & CAN_CTRLMODE_FD) {
rcar_canfd_write(priv->base,
@@ -1446,7 +1446,7 @@ static void rcar_canfd_rx_pkt(struct rcar_canfd_channel *priv)
if (priv->can.ctrlmode & CAN_CTRLMODE_FD) {
if (sts & RCANFD_RFFDSTS_RFFDF)
- cf->len = can_dlc2len(RCANFD_RFPTR_RFDLC(dlc));
+ cf->len = can_fd_dlc2len(RCANFD_RFPTR_RFDLC(dlc));
else
cf->len = can_cc_dlc2len(RCANFD_RFPTR_RFDLC(dlc));