diff options
author | Björn Töpel <bjorn.topel@intel.com> | 2021-01-18 16:13:15 +0100 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2021-02-12 10:33:42 -0800 |
commit | f892a9af0cd824d6af38e4127f673195e09db3c3 (patch) | |
tree | 485e0ef2acc15f957049b4b2faea65f56173e82a /drivers/net/ethernet/intel | |
parent | 5c57e507f247ece4d2190f17446850e5a3fa6cf4 (diff) | |
download | linux-f892a9af0cd824d6af38e4127f673195e09db3c3.tar.gz |
i40e: Simplify the do-while allocation loop
Fold the count decrement into the while-statement.
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-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) { |