From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next 8/8] i40e, xsk: Simplify the do-while allocation loop
Date: Fri, 11 Dec 2020 17:49:56 +0100 [thread overview]
Message-ID: <20201211164956.59628-9-maciej.fijalkowski@intel.com> (raw)
In-Reply-To: <20201211164956.59628-1-maciej.fijalkowski@intel.com>
From: Bj?rn T?pel <bjorn.topel@intel.com>
Fold the count decrement into the while-statement.
Signed-off-by: Bj?rn T?pel <bjorn.topel@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index bfa84bfb0488..679200d94ef8 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)
--
2.20.1
prev parent reply other threads:[~2020-12-11 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 16:49 [Intel-wired-lan] [PATCH net-next 0/8] i40e/ice cleanups Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 1/8] i40e: drop redundant check when setting xdp prog Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 2/8] i40e: drop misleading function comments Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 3/8] i40e: adjust i40e_is_non_eop Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 4/8] ice: simplify ice_run_xdp Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 5/8] ice: move skb pointer from rx_buf to rx_ring Maciej Fijalkowski
2020-12-12 4:23 ` Jakub Kicinski
2020-12-14 15:07 ` Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 6/8] ice: remove redundant checks in ice_change_mtu Maciej Fijalkowski
2020-12-11 16:49 ` [Intel-wired-lan] [PATCH net-next 7/8] ice: skip NULL check against XDP prog in ZC path Maciej Fijalkowski
2020-12-11 16:49 ` Maciej Fijalkowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201211164956.59628-9-maciej.fijalkowski@intel.com \
--to=maciej.fijalkowski@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox