From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9C4C48D94 for ; Sun, 20 May 2018 21:51:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 May 2018 12:51:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,423,1520924400"; d="scan'208";a="52394051" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 20 May 2018 12:51:56 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 20 May 2018 12:51:56 -0700 Received: from hasmsx105.ger.corp.intel.com (10.184.198.19) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 20 May 2018 12:51:56 -0700 Received: from HASMSX110.ger.corp.intel.com ([169.254.6.228]) by HASMSX105.ger.corp.intel.com ([169.254.1.119]) with mapi id 14.03.0319.002; Sun, 20 May 2018 22:51:53 +0300 From: "Rosen, Rami" To: Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] pci: remove unused function Thread-Index: AQHT7jkhD2F2jV6L6kCdk6U0765ehaQ5CvaA Date: Sun, 20 May 2018 19:51:53 +0000 Message-ID: <9B0331B6EBBD0E4684FBFAEDA55776F958A27D7F@HASMSX110.ger.corp.intel.com> References: <20180517234458.5602-1-stephen@networkplumber.org> In-Reply-To: <20180517234458.5602-1-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzMxNjAxYmEtMTQ4NS00NTEzLWIwNzgtNWFkYTg2ZDc1MDQwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiS0JcL1hZcWQwNVJpMWtoN0t1QzdmQ0ZiNU5WZ3pnazJjRGh3ZTRuUGx0OWM3RHpYTnpEZnQyazY5NGdEeCtJOU4ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.249.90.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] pci: remove unused function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 19:52:00 -0000 Hi, Looks good to me. I noticed that the same is also with=20 the rte_pci_detach() function, and I will send a patch to remove it as well. Regards, Rami Rosen -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger Sent: Friday, May 18, 2018 02:45 To: dev@dpdk.org Cc: Stephen Hemminger Subject: [dpdk-dev] [PATCH] pci: remove unused function The function rte_pci_probe_one is private to PCI and is not used anywhere i= n current code base. Remove dead code. Signed-off-by: Stephen Hemminger --- drivers/bus/pci/pci_common.c | 38 ------------------------------------ drivers/bus/pci/private.h | 15 -------------- 2 files changed, 53 deletions(-) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c in= dex 7215aaec3add..3d21d7373b60 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -254,44 +254,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev) return 1; } =20 -/* - * Find the pci device specified by pci address, then invoke probe functio= n of - * the driver of the device. - */ -int -rte_pci_probe_one(const struct rte_pci_addr *addr) -{ - struct rte_pci_device *dev =3D NULL; - - int ret =3D 0; - - if (addr =3D=3D NULL) - return -1; - - /* update current pci device in global list, kernel bindings might have - * changed since last time we looked at it. - */ - if (pci_update_device(addr) < 0) - goto err_return; - - FOREACH_DEVICE_ON_PCIBUS(dev) { - if (rte_pci_addr_cmp(&dev->addr, addr)) - continue; - - ret =3D pci_probe_all_drivers(dev); - if (ret) - goto err_return; - return 0; - } - return -1; - -err_return: - RTE_LOG(WARNING, EAL, - "Requested device " PCI_PRI_FMT " cannot be used\n", - addr->domain, addr->bus, addr->devid, addr->function); - return -1; -} - /* * Detach device specified by its pci address. */ diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h index 88= fa587e74dc..748abb6617fe 100644 --- a/drivers/bus/pci/private.h +++ b/drivers/bus/pci/private.h @@ -32,21 +32,6 @@ rte_pci_probe(void); */ int rte_pci_scan(void); =20 -/** - * Probe the single PCI device. - * - * Scan the content of the PCI bus, and find the pci device specified by p= ci - * address, then call the probe() function for registered driver that has = a - * matching entry in its id_table for discovered device. - * - * @param addr - * The PCI Bus-Device-Function address to probe. - * @return - * - 0 on success. - * - Negative on error. - */ -int rte_pci_probe_one(const struct rte_pci_addr *addr); - /** * Close the single PCI device. * -- 2.17.0