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>
This commit is contained in:
Björn Töpel 2021-01-18 16:13:15 +01:00 committed by Tony Nguyen
parent 5c57e507f2
commit f892a9af0c
1 changed files with 1 additions and 3 deletions

View File

@ -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) {