Skip to content

Commit f892a9a

Browse files
Björn Töpelanguy11
authored andcommitted
i40e: Simplify the do-while allocation loop
Fold the count decrement into the while-statement. Reviewed-by: Maciej Fijalkowski <[email protected]> Signed-off-by: Björn Töpel <[email protected]> Tested-by: Kiran Bhandare <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 5c57e50 commit f892a9a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/intel/i40e/i40e_xsk.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count)
215215
bi = i40e_rx_bi(rx_ring, 0);
216216
ntu = 0;
217217
}
218-
219-
count--;
220-
} while (count);
218+
} while (--count);
221219

222220
no_buffers:
223221
if (rx_ring->next_to_use != ntu) {

0 commit comments

Comments
 (0)