From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: didier.pallard@6wind.com, thomas@monjalon.net,
hari.kumarx.vemula@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] eal: remove dead code in corelist parsing
Date: Wed, 13 Feb 2019 21:06:58 +0100 [thread overview]
Message-ID: <1550088419-10812-1-git-send-email-david.marchand@redhat.com> (raw)
We don't need to look for trailing spaces.
This is a copy/paste block from eal_parse_coremask().
Remove it and the associated comment.
Fixes: d888cb8b9613 ("eal: add core list input format")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/common/eal_common_options.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index b766252..c89f7ab 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -567,10 +567,10 @@ static int xdigit2val(unsigned char c)
eal_parse_corelist(const char *corelist)
{
struct rte_config *cfg = rte_eal_get_configuration();
- int i, idx = 0;
unsigned count = 0;
char *end = NULL;
int min, max;
+ int idx;
if (eal_service_cores_parsed())
RTE_LOG(WARNING, EAL,
@@ -580,12 +580,9 @@ static int xdigit2val(unsigned char c)
if (corelist == NULL)
return -1;
- /* Remove all blank characters ahead and after */
+ /* Remove all blank characters ahead */
while (isblank(*corelist))
corelist++;
- i = strlen(corelist);
- while ((i > 0) && isblank(corelist[i - 1]))
- i--;
/* Reset config */
for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
--
1.8.3.1
next reply other threads:[~2019-02-13 20:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 20:06 David Marchand [this message]
2019-02-13 20:06 ` [dpdk-dev] [PATCH 2/2] eal: fix corelist validation with disabled cores David Marchand
2019-03-07 20:23 ` [dpdk-dev] [dpdk-stable] " 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=1550088419-10812-1-git-send-email-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=didier.pallard@6wind.com \
--cc=hari.kumarx.vemula@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).