Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 124579de authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

fm10k: don't use BIT() macro where the value isn't a bitmask



The FM10K_MAX_DATA_PER_TXD is really just using a bitshift as a power of
2 operation in an efficient manner. We shouldn't represent this as a BIT()
because that obscures the intention of the operation.

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6f30e8b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -406,7 +406,7 @@ static inline u16 fm10k_desc_unused(struct fm10k_ring *ring)
	 (&(((union fm10k_rx_desc *)((R)->desc))[i]))
	 (&(((union fm10k_rx_desc *)((R)->desc))[i]))


#define FM10K_MAX_TXD_PWR	14
#define FM10K_MAX_TXD_PWR	14
#define FM10K_MAX_DATA_PER_TXD	BIT(FM10K_MAX_TXD_PWR)
#define FM10K_MAX_DATA_PER_TXD	(1u << FM10K_MAX_TXD_PWR)


/* Tx Descriptors needed, worst case */
/* Tx Descriptors needed, worst case */
#define TXD_USE_COUNT(S)	DIV_ROUND_UP((S), FM10K_MAX_DATA_PER_TXD)
#define TXD_USE_COUNT(S)	DIV_ROUND_UP((S), FM10K_MAX_DATA_PER_TXD)