From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 1/2] pci: make rte_pci_remove_device static Date: Mon, 21 May 2018 09:41:49 -0700 Message-ID: <20180521164150.24252-2-stephen@networkplumber.org> References: <20180521164150.24252-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by dpdk.org (Postfix) with ESMTP id 59DFC1B1C9 for ; Mon, 21 May 2018 18:41:56 +0200 (CEST) Received: by mail-pl0-f66.google.com with SMTP id t12-v6so9118032plo.7 for ; Mon, 21 May 2018 09:41:56 -0700 (PDT) In-Reply-To: <20180521164150.24252-1-stephen@networkplumber.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Only used in one file, and therefore can be made static. Signed-off-by: Stephen Hemminger --- drivers/bus/pci/pci_common.c | 5 ++++- drivers/bus/pci/private.h | 10 ---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 7215aaec3add..d3ac04a8f00f 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -26,6 +26,9 @@ #include "private.h" + +static void rte_pci_remove_device(struct rte_pci_device *pci_device); + extern struct rte_pci_bus rte_pci_bus; #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices" @@ -445,7 +448,7 @@ rte_pci_insert_device(struct rte_pci_device *exist_pci_dev, } /* Remove a device from PCI bus */ -void +static void rte_pci_remove_device(struct rte_pci_device *pci_dev) { TAILQ_REMOVE(&rte_pci_bus.device_list, pci_dev, next); diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h index 88fa587e74dc..02e2fb44367f 100644 --- a/drivers/bus/pci/private.h +++ b/drivers/bus/pci/private.h @@ -93,16 +93,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev); void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev, struct rte_pci_device *new_pci_dev); -/** - * Remove a PCI device from the PCI Bus. This sets to NULL the bus references - * in the PCI device object as well as the generic device object. - * - * @param pci_device - * PCI device to be removed from PCI Bus - * @return void - */ -void rte_pci_remove_device(struct rte_pci_device *pci_device); - /** * Update a pci device object by asking the kernel for the latest information. * -- 2.17.0