Skip to contentSkip to conversation

can: peak_canfd: Remove unused macros

PATCH In review Wang Hai 2 participants 2 messages Sep 4, 2020 – Sep 15, 2020

Subsystems (3)
lore
Share & tools
lore

Wang Hai

author
#0 lore raw

PATCH 1/1 can: peak_canfd: Remove unused macros

CANFD_CLK_SEL_DIV_MASK and CANFD_OPTIONS_SET are never used after they were introduced. Remove them.

---
 drivers/net/can/peak_canfd/peak_pciefd_main.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/peak_canfd/peak_pciefd_main.c +0 -3
index 9469d4421afe..5f0f39d2fa28 100644
@@ -83,7 +83,6 @@ MODULE_LICENSE("GPL v2");
 #define CANFD_MISC_TS_RST		0x00000001	/* timestamp cnt rst */
 
 /* CAN-FD channel Clock SELector Source & DIVider */
-#define CANFD_CLK_SEL_DIV_MASK		0x00000007
 #define CANFD_CLK_SEL_DIV_60MHZ		0x00000000	/* SRC=240MHz only */
 #define CANFD_CLK_SEL_DIV_40MHZ		0x00000001	/* SRC=240MHz only */
 #define CANFD_CLK_SEL_DIV_30MHZ		0x00000002	/* SRC=240MHz only */
@@ -116,8 +115,6 @@ MODULE_LICENSE("GPL v2");
 #define CANFD_CTL_IRQ_CL_DEF	16	/* Rx msg max nb per IRQ in Rx DMA */
 #define CANFD_CTL_IRQ_TL_DEF	10	/* Time before IRQ if < CL (x100 µs) */
 
-#define CANFD_OPTIONS_SET	(CANFD_OPTION_ERROR | CANFD_OPTION_BUSLOAD)
-
 /* Tx anticipation window (link logical address should be aligned on 2K
  * boundary)
  */
Signature · 1 line
2.17.1
#1 lore raw
Quoted 14 lines · Wang Hai

CANFD_CLK_SEL_DIV_MASK and CANFD_OPTIONS_SET are never used after they were introduced. Remove them.

---
 drivers/net/can/peak_canfd/peak_pciefd_main.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/peak_canfd/peak_pciefd_main.c +0 -0
index 9469d4421afe..5f0f39d2fa28 100644

drivers/net/can/peak_canfd/peak_pciefd_main.c MODULE_LICENSE("GPL v2"); · line 86

Quoted 4 lines
drivers/net/can/peak_canfd/peak_pciefd_main.c +0 -1
@@ -83,7 +83,6 @@ MODULE_LICENSE("GPL v2");
 #define CANFD_MISC_TS_RST		0x00000001	/* timestamp cnt rst */
 
 /* CAN-FD channel Clock SELector Source & DIVider */
-#define CANFD_CLK_SEL_DIV_MASK		0x00000007

I would like to keep this for documentation purpose.

drivers/net/can/peak_canfd/peak_pciefd_main.c MODULE_LICENSE("GPL v2"); · line 120

Quoted 9 lines
drivers/net/can/peak_canfd/peak_pciefd_main.c +0 -2
 #define CANFD_CLK_SEL_DIV_60MHZ		0x00000000	/* SRC=240MHz only */
 #define CANFD_CLK_SEL_DIV_40MHZ		0x00000001	/* SRC=240MHz only */
 #define CANFD_CLK_SEL_DIV_30MHZ		0x00000002	/* SRC=240MHz only */
@@ -116,8 +115,6 @@ MODULE_LICENSE("GPL v2");
 #define CANFD_CTL_IRQ_CL_DEF	16	/* Rx msg max nb per IRQ in Rx DMA */
 #define CANFD_CTL_IRQ_TL_DEF	10	/* Time before IRQ if < CL (x100 µs) */
 
-#define CANFD_OPTIONS_SET	(CANFD_OPTION_ERROR | CANFD_OPTION_BUSLOAD)
-

Okay, let's remove this.

drivers/net/can/peak_canfd/peak_pciefd_main.c MODULE_LICENSE("GPL v2"); · line 120

Quoted 4 lines
drivers/net/can/peak_canfd/peak_pciefd_main.c +0 -0
 /* Tx anticipation window (link logical address should be aligned on 2K
  * boundary)
  */

Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |