eal: remove forward declaration of generic driver
PATCH 1/1 eal: remove forward declaration of generic driver
We can just move rte_driver definition before rte_device (which depends on rte_driver).
Signed-off-by Thomas Monjalon <[email protected]>
--- lib/librte_eal/common/include/rte_dev.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
lib/librte_eal/common/include/rte_dev.h +8 -11
@@ -123,8 +123,14 @@ struct rte_mem_resource {void *addr;/**< Virtual address, NULL when not mapped. */ }; -/* Forward declaration */ -struct rte_driver ; +/** +* A structure describing a device driver. +*/ +struct rte_driver { +TAILQ_ENTRY (rte_driver) next;/**< Next in list. */ +const char *name;/**< Driver name. */ +const char *alias;/**< Driver alias. */ +};/** * A structure describing a generic device.
@@ -138,15 +144,6 @@ struct rte_device { };/** -* A structure describing a device driver. -*/ -struct rte_driver { -TAILQ_ENTRY (rte_driver) next;/**< Next in list. */ -const char *name;/**< Driver name. */ -const char *alias;/**< Driver alias. */ -}; - -/** * Initialize a driver specified by name. * * @param name
Signature · 1 line
2.12.2
Thomas Monjalon
Applied04/05/2017 17:46, Thomas Monjalon:
Quoted 4 lines
We can just move
rte_driverdefinition beforerte_device(which depends onrte_driver).Signed-off-by Thomas Monjalon <[email protected]>
Applied