Skip to content

Commit 5ab5224

Browse files
refactormanJeff Kirsher
authored andcommitted
ice: Cleanup magic number
Use define for the unit size shift of the Rx LAN context descriptor base address instead of the magic number 7. Signed-off-by: Anirudh Venkataramanan <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 6efa623 commit 5ab5224

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ enum ice_rx_flex_desc_status_error_0_bits {
265265
struct ice_rlan_ctx {
266266
u16 head;
267267
u16 cpuid; /* bigger than needed, see above for reason */
268+
#define ICE_RLAN_BASE_S 7
268269
u64 base;
269270
u16 qlen;
270271
#define ICE_RLAN_CTX_DBUF_S 7

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3983,7 +3983,7 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)
39833983
/* clear the context structure first */
39843984
memset(&rlan_ctx, 0, sizeof(rlan_ctx));
39853985

3986-
rlan_ctx.base = ring->dma >> 7;
3986+
rlan_ctx.base = ring->dma >> ICE_RLAN_BASE_S;
39873987

39883988
rlan_ctx.qlen = ring->count;
39893989

0 commit comments

Comments
 (0)