[dpdk-dev] eal: remove forward declaration of generic driver

Message ID 20170504154620.29243-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Headers

Checks

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

Commit Message

Thomas Monjalon May 4, 2017, 3:46 p.m. UTC
  We can just move rte_driver definition before rte_device
(which depends on rte_driver).

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/include/rte_dev.h | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
  

Comments

Thomas Monjalon May 5, 2017, 12:29 p.m. UTC | #1
04/05/2017 17:46, Thomas Monjalon:
> We can just move rte_driver definition before rte_device
> (which depends on rte_driver).
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Applied
  

Patch

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index b63d0540d..759059889 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -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