Re-use existing code, remove incorrect comments. Signed-off-by: Gaetan Rivet <gaetan.ri...@6wind.com> --- 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