From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id B588BC314 for ; Tue, 14 Apr 2015 19:55:43 +0200 (CEST) Received: by pdea3 with SMTP id a3so20200538pde.3 for ; Tue, 14 Apr 2015 10:55:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IHgp+mYhh7vgLxNlZ97s2qLZmHgoAl83BK5KE9I7IEQ=; b=SM/bQgpTh/wdh+2iTqwXDhvim7UxdMj1e4PVvTlXA5UCQjZVRKaT54ww9HkYPO/Z1x dNY/tMRbm56IQeC+dVUJvTfv9tuMuWdvprm18nER/aVHRdr4ThliFCirxocHD9tbJqE9 mMB6flm1jpyE8DnH7AzxDBFS57VPGNblcPJpglpEW7/gB16js/xMSMlTykIGq2+hRTWK Fe2Juh+OeoKELCbhTzc9SATNZPzKrFz14wV34OyIYSXC+WfdBGvhLBliMsSQa4LFSOvP tXV1wVcDxWx+abo6d774dLarSpEWgLcEjpfWCfGVYIUDAmcliYpDee0wrpMDk+eZenhL DNxg== X-Gm-Message-State: ALoCoQkig+M9WZ+QBBkYuaDxmk0DfheZ8cI7odLdVf/vkkVYI4LQphBtcWzQwOc8Hj7Q5YZmdmuo X-Received: by 10.70.132.104 with SMTP id ot8mr7725165pdb.31.1429034142980; Tue, 14 Apr 2015 10:55:42 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id kl10sm1731377pbd.15.2015.04.14.10.55.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Apr 2015 10:55:42 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Tue, 14 Apr 2015 10:55:36 -0700 Message-Id: <1429034136-13482-1-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] pci: make rte_pci_probe void X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2015 17:55:44 -0000 Since rte_pci_probe always returns 0 or exits via rte_exit() there is no point in having it return a value. Just make it void Signed-off-by: Stephen Hemminger --- lib/librte_eal/bsdapp/eal/eal.c | 3 +-- lib/librte_eal/common/eal_common_pci.c | 9 +++------ lib/librte_eal/common/include/rte_pci.h | 6 +----- lib/librte_eal/linuxapp/eal/eal.c | 3 +-- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 871d5f4..9a9ada2 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -551,8 +551,7 @@ rte_eal_init(int argc, char **argv) rte_eal_mp_wait_lcore(); /* Probe & Initialize PCI devices */ - if (rte_eal_pci_probe()) - rte_panic("Cannot probe PCI\n"); + rte_eal_pci_probe(); return fctret; } diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 808b87b..dbb4c92 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -223,13 +223,13 @@ err_return: * all registered drivers that have a matching entry in its id_table * for discovered devices. */ -int +void rte_eal_pci_probe(void) { struct rte_pci_device *dev = NULL; struct rte_devargs *devargs; int probe_all = 0; - int ret = 0; + int ret; if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) == 0) probe_all = 1; @@ -252,12 +252,10 @@ rte_eal_pci_probe(void) " cannot be used\n", dev->addr.domain, dev->addr.bus, dev->addr.devid, dev->addr.function); } - - return 0; } /* dump one device */ -static int +static void pci_dump_one_device(FILE *f, struct rte_pci_device *dev) { int i; @@ -273,7 +271,6 @@ pci_dump_one_device(FILE *f, struct rte_pci_device *dev) dev->mem_resource[i].phys_addr, dev->mem_resource[i].len); } - return 0; } /* dump devices on the bus */ diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 785852d..052d3da 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -327,12 +327,8 @@ int rte_eal_pci_scan(void); * Scan the content of the PCI bus, and call the probe() function for * all registered drivers that have a matching entry in its id_table * for discovered devices. - * - * @return - * - 0 on success. - * - Negative on error. */ -int rte_eal_pci_probe(void); +void rte_eal_pci_probe(void); #ifdef RTE_LIBRTE_EAL_HOTPLUG /** diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index bd770cf..bd7ac62 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -842,8 +842,7 @@ rte_eal_init(int argc, char **argv) rte_eal_mp_wait_lcore(); /* Probe & Initialize PCI devices */ - if (rte_eal_pci_probe()) - rte_panic("Cannot probe PCI\n"); + rte_eal_pci_probe(); return fctret; } -- 2.1.4