From: Björn Töpel Date: Mon, 18 Jan 2021 15:13:15 +0000 (+0100) Subject: i40e: Simplify the do-while allocation loop X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f892a9af0cd824d6af38e4127f673195e09db3c3;p=linux.git i40e: Simplify the do-while allocation loop Fold the count decrement into the while-statement. Reviewed-by: Maciej Fijalkowski Signed-off-by: Björn Töpel Tested-by: Kiran Bhandare Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c index 470b8600adb1b..4f11f7bf75d1f 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) {