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

Message ID 20170714211213.34436-15-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_devtype field ``type`` from struct rte_devargs.

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

Comments

Ferruh Yigit Sept. 4, 2017, 4:29 p.m. UTC | #1
On 7/14/2017 10:12 PM, Jan Blunck wrote:
> This removes the enum rte_devtype field ``type`` from struct rte_devargs.
> 
> Signed-off-by: Jan Blunck <jblunck@infradead.org>

<...>

> --- 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;
> -	/** Type of device. */
> -	enum rte_devtype type;

I am not sure if type can be removed, please check the comment on patch
5/15.

>  	/** Bus handle for the device. */
>  	struct rte_bus *bus;
>  	/** Name of the bus the device belongs to. */
>
  

Patch

diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index d04015582..c785fcc79 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->type = RTE_DEVTYPE_VIRTUAL;
 	devargs->bus = &rte_vdev_bus;
 	if (args)
 		devargs->args = strdup(args);
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index 10953327f..e3722ca28 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;
-	/** Type of device. */
-	enum rte_devtype type;
 	/** Bus handle for the device. */
 	struct rte_bus *bus;
 	/** Name of the bus the device belongs to. */