History

can: bittiming: replace CAN units with the generic ones from linux/units.h

In [1], we introduced a set of units in linux/can/bittiming.h. Since then, generic SI prefixes were added to linux/units.h in [2]. Those new prefixes can perfectly replace CAN specific ones. This patch replaces all occurrences of the CAN units with their corresponding prefix (from linux/units) and the unit (as a comment) according to below table. CAN units SI metric prefix (from linux/units) + unit (as a comment) ------------------------------------------------------------------------ CAN_KBPS KILO /* BPS */ CAN_MBPS MEGA /* BPS */ CAM_MHZ MEGA /* Hz */ The definition are then removed from linux/can/bittiming.h [1] commit 1d7750760b70 ("can: bittiming: add CAN_KBPS, CAN_MBPS and CAN_MHZ macros") [2] commit 26471d4a6cf8 ("units: Add SI metric prefix definitions")

Vincent Mailhol committed 4 years ago

Commit 330c6d31 parent 1fe5b014 files · +9 −13Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/can/bittiming.h+0−7
@@ -12,13 +12,6 @@ · 11 unmodified lines
12#define CAN_SYNC_SEG 112#define CAN_SYNC_SEG 1
13 13
14 14
15/* Kilobits and Megabits per second */
16#define CAN_KBPS 1000UL
17#define CAN_MBPS 1000000UL
18
19/* Megahertz */
20#define CAN_MHZ 1000000UL
21
22#define CAN_CTRLMODE_TDC_MASK \15#define CAN_CTRLMODE_TDC_MASK \
23 (CAN_CTRLMODE_TDC_AUTO | CAN_CTRLMODE_TDC_MANUAL)16 (CAN_CTRLMODE_TDC_AUTO | CAN_CTRLMODE_TDC_MANUAL)
24 17