[RFC,05/11] devargs: remove dependency on bus header

Message ID 20220628144643.1213026-6-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Bus cleanup for 22.11 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand June 28, 2022, 2:46 p.m. UTC
  We don't need to include rte_bus.h.
Only a forward declaration of rte_bus and an inclusion of rte_dev.h are
needed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_vdev.c          | 1 +
 lib/eal/include/rte_devargs.h | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/app/test/test_vdev.c b/app/test/test_vdev.c
index 720722c363..5eeff3106d 100644
--- a/app/test/test_vdev.c
+++ b/app/test/test_vdev.c
@@ -8,6 +8,7 @@ 
 
 #include <rte_common.h>
 #include <rte_kvargs.h>
+#include <rte_bus.h>
 #include <rte_bus_vdev.h>
 
 #include "test.h"
diff --git a/lib/eal/include/rte_devargs.h b/lib/eal/include/rte_devargs.h
index 37a0f042ab..38dee2f288 100644
--- a/lib/eal/include/rte_devargs.h
+++ b/lib/eal/include/rte_devargs.h
@@ -22,7 +22,9 @@  extern "C" {
 
 #include <stdio.h>
 #include <rte_compat.h>
-#include <rte_bus.h>
+#include <rte_dev.h>
+
+struct rte_bus;
 
 /**
  * Bus type key in global devargs syntax.