diff options
author | Björn Töpel <[email protected]> | 2021-01-18 16:13:15 +0100 |
---|---|---|
committer | Tony Nguyen <[email protected]> | 2021-02-12 10:33:42 -0800 |
commit | f892a9af0cd824d6af38e4127f673195e09db3c3 (patch) | |
tree | 485e0ef2acc15f957049b4b2faea65f56173e82a | |
parent | 5c57e507f247ece4d2190f17446850e5a3fa6cf4 (diff) |
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]>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c index 470b8600adb1..4f11f7bf75d1 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c +++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c @@ -215,9 +215,7 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count) bi = i40e_rx_bi(rx_ring, 0); ntu = 0; } - - count--; - } while (count); + } while (--count); no_buffers: if (rx_ring->next_to_use != ntu) { |