Skip to contentSkip to conversation

fm10k: use BIT() macro instead of open-coded bit-shifting

PATCH New Bruce Allan 2 participants 2 messages Oct 29, 2015 – Nov 9, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fm10k: use BIT() macro instead of open-coded bit-shifting

---
 drivers/net/ethernet/intel/fm10k/fm10k.h      |    2 +-
 drivers/net/ethernet/intel/fm10k/fm10k_type.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k.h +1 -1
index 4aaaa90..6735f7d 100644
@@ -422,7 +422,7 @@ static inline u16 fm10k_desc_unused(struct fm10k_ring *ring)
 	 (&(((union fm10k_rx_desc *)((R)->desc))[i]))
 
 #define FM10K_MAX_TXD_PWR	14
-#define FM10K_MAX_DATA_PER_TXD	(1 << FM10K_MAX_TXD_PWR)
+#define FM10K_MAX_DATA_PER_TXD	BIT(FM10K_MAX_TXD_PWR)
 
 /* Tx Descriptors needed, worst case */
 #define TXD_USE_COUNT(S)	DIV_ROUND_UP((S), FM10K_MAX_DATA_PER_TXD)
drivers/net/ethernet/intel/fm10k/fm10k_type.h +1 -1
index 2fd962f..098883d 100644
@@ -354,7 +354,7 @@ struct fm10k_hw;
 #define FM10K_VLAN_TABLE_VID_MAX		4096
 #define FM10K_VLAN_TABLE_VSI_MAX		64
 #define FM10K_VLAN_LENGTH_SHIFT			16
-#define FM10K_VLAN_CLEAR			(1 << 15)
+#define FM10K_VLAN_CLEAR			BIT(15)
 #define FM10K_VLAN_ALL \
 	((FM10K_VLAN_TABLE_VID_MAX - 1) << FM10K_VLAN_LENGTH_SHIFT)
 
#1 lore raw

PATCH v2 1/1 fm10k: use BIT() macro instead of open-coded bit-shifting

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bruce Allan
Sent: Wednesday, October 28, 2015 5:20 PM
To: [email protected]
Subject: [Intel-wired-lan] [next-queue PATCH v2] fm10k: use BIT() macro instead of open-coded bit-shifting

---