Commit 1ea0a522 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: length: convert to kernel coding style

This patch converts the file into the kernel coding style.
Reviewed-by: default avatarVincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20210111141930.693847-8-mkl@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 0a042c6e
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
/* CAN DLC to real data length conversion helpers */ /* CAN DLC to real data length conversion helpers */
static const u8 dlc2len[] = {0, 1, 2, 3, 4, 5, 6, 7, static const u8 dlc2len[] = {
8, 12, 16, 20, 24, 32, 48, 64}; 0, 1, 2, 3, 4, 5, 6, 7,
8, 12, 16, 20, 24, 32, 48, 64
};
/* get data length from raw data length code (DLC) */ /* get data length from raw data length code (DLC) */
u8 can_fd_dlc2len(u8 dlc) u8 can_fd_dlc2len(u8 dlc)
...@@ -16,16 +18,18 @@ u8 can_fd_dlc2len(u8 dlc) ...@@ -16,16 +18,18 @@ u8 can_fd_dlc2len(u8 dlc)
} }
EXPORT_SYMBOL_GPL(can_fd_dlc2len); EXPORT_SYMBOL_GPL(can_fd_dlc2len);
static const u8 len2dlc[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, /* 0 - 8 */ static const u8 len2dlc[] = {
9, 9, 9, 9, /* 9 - 12 */ 0, 1, 2, 3, 4, 5, 6, 7, 8, /* 0 - 8 */
10, 10, 10, 10, /* 13 - 16 */ 9, 9, 9, 9, /* 9 - 12 */
11, 11, 11, 11, /* 17 - 20 */ 10, 10, 10, 10, /* 13 - 16 */
12, 12, 12, 12, /* 21 - 24 */ 11, 11, 11, 11, /* 17 - 20 */
13, 13, 13, 13, 13, 13, 13, 13, /* 25 - 32 */ 12, 12, 12, 12, /* 21 - 24 */
14, 14, 14, 14, 14, 14, 14, 14, /* 33 - 40 */ 13, 13, 13, 13, 13, 13, 13, 13, /* 25 - 32 */
14, 14, 14, 14, 14, 14, 14, 14, /* 41 - 48 */ 14, 14, 14, 14, 14, 14, 14, 14, /* 33 - 40 */
15, 15, 15, 15, 15, 15, 15, 15, /* 49 - 56 */ 14, 14, 14, 14, 14, 14, 14, 14, /* 41 - 48 */
15, 15, 15, 15, 15, 15, 15, 15}; /* 57 - 64 */ 15, 15, 15, 15, 15, 15, 15, 15, /* 49 - 56 */
15, 15, 15, 15, 15, 15, 15, 15 /* 57 - 64 */
};
/* map the sanitized data length to an appropriate data length code */ /* map the sanitized data length to an appropriate data length code */
u8 can_fd_len2dlc(u8 len) u8 can_fd_len2dlc(u8 len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment