From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 799861B1C1 for ; Thu, 12 Oct 2017 10:21:54 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id l68so10984617wmd.5 for ; Thu, 12 Oct 2017 01:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=MIfL7v1EHijcKuD1bQ2byh5AY6SGimfD+kye8AXLdNo=; b=oTHHhhYa3/+ciLwZvML8bSR/m7ngdXKwBY3qJs3jqz4QEr0cj2llrZP46CnEjcNn9c 0VtL1SpMiJRJ83AtXYAna54SF+Fj6mmEe9+mO3lbrIew1p8k1ae1yHU+9jfjCAHd/iJH RbTkQOAzTqQyzlBs2zZxBEZ6DUa/bHTXbQ/PKLF0H2Xt0vbwjx+QnjUxu2U5vjso9O7l Srj+7rr1htpl3mOT0cVcpOMU5P2UXi6pWtDkOl4oZp20Qn29N32rwgWukFuh8M+vP8R/ uqHnAlEJ1YAnDoYFafIiviUVIvs5hMRY0nQEwgHcUjpVv77XFMEsVvfplFmQx6LQw1BO TPjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=MIfL7v1EHijcKuD1bQ2byh5AY6SGimfD+kye8AXLdNo=; b=TbQn7Sh9jbmY6x1DDzEE846t08Vc4dgiJEcgRr0wJbJfiMwy99rt2PP5Ecv2oi4NnS UHQoQ9o7J4nabXcYoNxg4tjW+cszw4g1MIcBztWmr9/w7H1Eujbo/eeCHTKJoFaPvuZl w+ZVe0nOY8c8RxjInHbPmMTwTicn+EMOvdKeY1EGUll1Qj0eVyHlvFfRIaz0EZS4T7RK 1YCnPYAAVvPzZngF+6vr1DpJOYLy8A7d/gNh2z/fs86Yhpxs0PuMN64j9IBsZzWLPUXn RJXslI+U4VyUfnbuqzOyXMS0u3EU0JltKVq66hvWfKessQfV/gspQbraZMcOEFriiGm8 EjbQ== X-Gm-Message-State: AMCzsaUnlxlh/leBvt9ydRXeRQU9jxYvSojZM+942v4n2ck8zU3qBSTT 2eXxxV3TztwFZpFniypQznPTFZdS X-Google-Smtp-Source: AOwi7QAWdnGVG9AHdeaIsK9+PTGr4aynosXfWpFbBsDpB+gBiHR3SotbntLbsYv5wL+ixIike17uaQ== X-Received: by 10.223.160.80 with SMTP id l16mr1442450wrl.281.1507796513828; Thu, 12 Oct 2017 01:21:53 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 200sm19424728wmu.44.2017.10.12.01.21.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:21:52 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:21:18 +0200 Message-Id: <49446c2cba12cd5da276bfde8479aa97dcf0f653.1507796100.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 11/18] devargs: simplify implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2017 08:21:55 -0000 Re-use existing code, remove incorrect comments. Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_devargs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index 49cc3b8..1d87cd9 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -153,21 +153,19 @@ rte_eal_devargs_insert(struct rte_devargs *da) return 0; } -/* store a whitelist parameter for later parsing */ int -rte_eal_devargs_add(const char *devargs_str) +rte_eal_devargs_add(const char *dev) { struct rte_devargs *devargs = NULL; - const char *dev = devargs_str; - /* use calloc instead of rte_zmalloc as it's called early at init */ devargs = calloc(1, sizeof(*devargs)); if (devargs == NULL) goto fail; if (rte_eal_devargs_parse(devargs, "%s", dev)) goto fail; - TAILQ_INSERT_TAIL(&devargs_list, devargs, next); + if (rte_eal_devargs_insert(devargs)) + goto fail; return 0; fail: -- 2.1.4