From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Bruce Richardson <bruce.richardson@intel.com>,
gaetan.rivet@6wind.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] pci: fix unneeded includes in public header file
Date: Mon, 16 Mar 2020 11:29:51 +0000 [thread overview]
Message-ID: <20200316112951.35428-1-bruce.richardson@intel.com> (raw)
The rte_pci.h file includes more header files than are actually needed,
which means that all users of it also include those headers. This patch
removes the unneeded headers - adding them elsewhere where other components
were requiring them but not including them directly.
Fixes: c752998b5e2e ("pci: introduce library and driver")
Cc: gaetan.rivet@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/bus/ifpga/rte_bus_ifpga.h | 1 +
drivers/common/mlx5/mlx5_common.h | 1 +
lib/librte_pci/rte_pci.h | 6 ------
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h
index 88a628964..a6eeaaf56 100644
--- a/drivers/bus/ifpga/rte_bus_ifpga.h
+++ b/drivers/bus/ifpga/rte_bus_ifpga.h
@@ -17,6 +17,7 @@ extern "C" {
#include <rte_bus.h>
#include <rte_pci.h>
+#include <rte_interrupts.h>
#include <rte_spinlock.h>
/** Name of Intel FPGA Bus */
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 961c60634..16de1b397 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <rte_pci.h>
+#include <rte_debug.h>
#include <rte_atomic.h>
#include <rte_log.h>
#include <rte_kvargs.h>
diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
index c87891405..c591af010 100644
--- a/lib/librte_pci/rte_pci.h
+++ b/lib/librte_pci/rte_pci.h
@@ -16,17 +16,11 @@
extern "C" {
#endif
-#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
-#include <errno.h>
#include <sys/queue.h>
-#include <stdint.h>
#include <inttypes.h>
-#include <rte_debug.h>
-#include <rte_interrupts.h>
-
/** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
#define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X")
--
2.20.1
next reply other threads:[~2020-03-16 11:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 11:29 Bruce Richardson [this message]
2020-03-16 14:30 ` Thomas Monjalon
2020-03-16 17:49 ` David Christensen
2020-03-16 19:07 ` David Christensen
2020-03-19 8:10 ` David Marchand
2020-03-20 13:25 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200316112951.35428-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=gaetan.rivet@6wind.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).