From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Stephen Hemminger <sthemmin@microsoft.com>
Subject: [dpdk-dev] [PATCH 2/3] fslmc: simplfy find_device
Date: Thu, 6 Jul 2017 08:28:11 -0700 [thread overview]
Message-ID: <20170706152812.16072-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20170706152812.16072-1-stephen@networkplumber.org>
Don't need separate flag value.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
drivers/bus/fslmc/fslmc_bus.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 1e3bbeeb0a66..88b969c073a0 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -111,12 +111,10 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
const void *data)
{
struct rte_dpaa2_device *dev;
- bool start_found = !start;
TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) {
- if (!start_found) {
- if (&dev->device == start)
- start_found = 1;
+ if (start && &dev->device == start)
+ start = NULL; /* starting point found */
continue;
}
--
2.11.0
next prev parent reply other threads:[~2017-07-06 15:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 15:28 [dpdk-dev] [PATCH 0/3] eal: minor cleanups Stephen Hemminger
2017-07-06 15:28 ` [dpdk-dev] [PATCH 1/3] eal: simplify finding starting point Stephen Hemminger
2017-07-06 15:28 ` Stephen Hemminger [this message]
2017-07-06 15:28 ` [dpdk-dev] [PATCH 3/3] eal: fix spelling in comment Stephen Hemminger
2017-07-08 17:29 ` [dpdk-dev] [PATCH 0/3] eal: minor cleanups Thomas Monjalon
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=20170706152812.16072-3-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=sthemmin@microsoft.com \
/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;
as well as URLs for NNTP newsgroup(s).