Move CAN_BIT_STUFFING_OVERHEAD and CAN_IDLE_CONDITION_SAMPLES generic CAN macros into linux/can/length.h . No functional change. Signed-off-by: Marek Vasut <marex@xxxxxxx> --- Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Eric Dumazet <edumazet@xxxxxxxxxx> Cc: Jakub Kicinski <kuba@xxxxxxxxxx> Cc: Liam Girdwood <lgirdwood@xxxxxxxxx> Cc: Manivannan Sadhasivam <mani@xxxxxxxxxx> Cc: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Cc: Marek Vasut <marex@xxxxxxx> Cc: Mark Brown <broonie@xxxxxxxxxx> Cc: Paolo Abeni <pabeni@xxxxxxxxxx> Cc: Thomas Kopp <thomas.kopp@xxxxxxxxxxxxx> Cc: Wolfgang Grandegger <wg@xxxxxxxxxxxxxx> Cc: linux-can@xxxxxxxxxxxxxxx --- V2: - New separate patch, separate from the mcp251xfd addition to ease backporting --- drivers/net/can/spi/mcp251xfd/mcp251xfd.h | 9 --------- include/linux/can/length.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd.h b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h index 412d58d84fb63..7024ff0cc2c0c 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd.h +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h @@ -432,15 +432,6 @@ static_assert(MCP251XFD_FIFO_RX_NUM <= 4U); /* Use Half Duplex SPI transfers */ #define MCP251XFD_QUIRK_HALF_DUPLEX BIT(5) -/* CAN bit stuffing overhead multiplication factor */ -#define CAN_BIT_STUFFING_OVERHEAD 1.2 - -/* Number of samples after which an idle condition is present on the bus - * as specified in the ISO. This is 11 consecutive sampled recessive bits - * after a full frame (if one is currently in transmission). - */ -#define CAN_IDLE_CONDITION_SAMPLES 11 - struct mcp251xfd_hw_tef_obj { u32 id; u32 flags; diff --git a/include/linux/can/length.h b/include/linux/can/length.h index 6995092b774ec..0e20e153955d4 100644 --- a/include/linux/can/length.h +++ b/include/linux/can/length.h @@ -122,6 +122,15 @@ */ #define CANFD_FRAME_LEN_MAX (CANFD_FRAME_OVERHEAD_EFF + CANFD_MAX_DLEN) +/* CAN bit stuffing overhead multiplication factor */ +#define CAN_BIT_STUFFING_OVERHEAD 1.2 + +/* Number of samples after which an idle condition is present on the bus + * as specified in the ISO. This is 11 consecutive sampled recessive bits + * after a full frame (if one is currently in transmission). + */ +#define CAN_IDLE_CONDITION_SAMPLES 11 + /* * can_cc_dlc2len(value) - convert a given data length code (dlc) of a * Classical CAN frame into a valid data length of max. 8 bytes. -- 2.39.2