[dpdk-dev,v2,15/15] devargs: remove bus field

Message ID 20170714211213.34436-16-jblunck@infradead.org (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jan Blunck July 14, 2017, 9:12 p.m. UTC
  This removes the enum rte_bus field ``bus`` from struct rte_devargs.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 lib/librte_eal/common/eal_common_devargs.c  | 3 +--
 lib/librte_eal/common/eal_common_vdev.c     | 1 -
 lib/librte_eal/common/include/rte_devargs.h | 2 --
 3 files changed, 1 insertion(+), 5 deletions(-)
  

Patch

diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index 44a8d8562..191f53607 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -87,8 +87,7 @@  rte_eal_devargs_parse(const char *busname, const char *dev,
 	if (busname == NULL || dev == NULL || da == NULL)
 		return -EINVAL;
 	/* Retrieve eventual bus info */
-	da->bus = rte_bus_find_by_name(busname);
-	if (da->bus == NULL) {
+	if (rte_bus_find_by_name(busname) == NULL) {
 		RTE_LOG(ERR, EAL, "Bus not found: \"%s\"\n", busname);
 		return -EFAULT;
 	}
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index c785fcc79..b33f15b03 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -141,7 +141,6 @@  alloc_devargs(const char *name, const char *args)
 	if (!devargs)
 		return NULL;
 
-	devargs->bus = &rte_vdev_bus;
 	if (args)
 		devargs->args = strdup(args);
 	else
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index e3722ca28..943a4ee98 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -75,8 +75,6 @@  enum rte_devtype {
 struct rte_devargs {
 	/** Next in list. */
 	TAILQ_ENTRY(rte_devargs) next;
-	/** Bus handle for the device. */
-	struct rte_bus *bus;
 	/** Name of the bus the device belongs to. */
 	char busname[RTE_DEV_NAME_MAX_LEN];
 	/** Name of the device. */