From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v2 08/10] eal: move PCI table macro Date: Fri, 8 Jul 2016 12:14:13 +0200 Message-ID: <1467972855-21873-9-git-send-email-thomas.monjalon@6wind.com> References: <1467905790-10597-1-git-send-email-thomas.monjalon@6wind.com> <1467972855-21873-1-git-send-email-thomas.monjalon@6wind.com> Cc: dev@dpdk.org To: Neil Horman Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 843CD5A7A for ; Fri, 8 Jul 2016 12:14:27 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id n127so9956670wme.1 for ; Fri, 08 Jul 2016 03:14:27 -0700 (PDT) In-Reply-To: <1467972855-21873-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove include of rte_pci.h in the generic header rte_dev.h and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h. Fixes: cb6696d22023 ("drivers: update registration macro usage") Suggested-by: David Marchand Signed-off-by: Thomas Monjalon --- lib/librte_eal/common/include/rte_dev.h | 6 +----- lib/librte_eal/common/include/rte_pci.h | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index e6f0d4c..68ca7ef 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -48,7 +48,7 @@ extern "C" { #include #include -#include + #include __attribute__((format(printf, 2, 0))) @@ -195,10 +195,6 @@ DRIVER_EXPORT_NAME(nm, __COUNTER__) #define DRV_EXP_TAG(name, tag) __##name##_##tag -#define DRIVER_REGISTER_PCI_TABLE(name, table) \ -static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \ -RTE_STR(table) - #define DRIVER_REGISTER_PARAM_STRING(name, str) \ static const char DRV_EXP_TAG(name, param_string_export)[] \ __attribute__((used)) = str diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index fa74962..3b0d26a 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -188,6 +188,11 @@ struct rte_pci_device { .subsystem_device_id = PCI_ANY_ID #endif +#define DRIVER_REGISTER_PCI_TABLE(name, table) \ +static const char __##name##_pci_tbl_export[] \ + __attribute__((used)) = \ + RTE_STR(table) + struct rte_pci_driver; /** -- 2.7.0