From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by dpdk.org (Postfix) with ESMTP id AFC2EC2FC for ; Fri, 17 Apr 2015 17:35:33 +0200 (CEST) Received: by pabsx10 with SMTP id sx10so128673971pab.3 for ; Fri, 17 Apr 2015 08:35:33 -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:in-reply-to :references; bh=Nitc4zLT/f2Dvg7i+Z1CJTrmLBTU6e3LoQOuYDtK2SY=; b=jaA8lXuenczJiZwerEnp3hz7YR/L8UviK22rPjAkP2P6q6jLQlS8MWqBaVYQPHtXT4 PLdXXc4y6kwo80uJFl0Hu3QXvRY+G2ZdV5+YfyTsA0iAsxZqrFSrBmz4I25DIMkRUw0E rVkkB11OIlNfUeHs1B607S3fqKtPRJd/4wR8cIq4bbQ1D1AGWNgnA81OPHSPdeDd42OH Xw5QvkESy0Q86VSBGtw2YapTeTPkgYcl0iq1BtXDO2UPGAUYMCixQgdoCTWQIhntNivN YRpeawMv2zIpmyxlEfWKSowLQDZqEFxRL54O6d2ViHjbZ7n8itSznrBGg9GkJUA46vBA P2PQ== X-Gm-Message-State: ALoCoQkq6JUwy/8fuMPPrlqTPaYwpuuD4fnM97207iA5Ke4roDBCboEAOOSyei04KfRQYtO93jxk X-Received: by 10.70.140.171 with SMTP id rh11mr6612121pdb.39.1429284933096; Fri, 17 Apr 2015 08:35:33 -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 dc5sm10460175pbc.53.2015.04.17.08.35.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Apr 2015 08:35:32 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Fri, 17 Apr 2015 08:35:34 -0700 Message-Id: <1429284934-3261-3-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1429284934-3261-1-git-send-email-stephen@networkplumber.org> References: <1429284934-3261-1-git-send-email-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 2/2] eal: pci probe and adjust_config should be 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: Fri, 17 Apr 2015 15:35:34 -0000 This functions always returned 0 and therefore should be void. Signed-off-by: Stephen Hemminger --- lib/librte_eal/common/eal_common_options.c | 3 +-- lib/librte_eal/common/eal_common_pci.c | 7 ++----- lib/librte_eal/common/eal_options.h | 2 +- lib/librte_eal/common/include/rte_pci.h | 6 +----- lib/librte_eal/linuxapp/eal/eal.c | 6 ++---- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 8fcb1ab..f47b401 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -794,7 +794,7 @@ eal_parse_common_option(int opt, const char *optarg, return 0; } -int +void eal_adjust_config(struct internal_config *internal_cfg) { int i; @@ -812,7 +812,6 @@ eal_adjust_config(struct internal_config *internal_cfg) for (i = 0; i < RTE_MAX_NUMA_NODES; i++) internal_cfg->memory += internal_cfg->socket_mem[i]; - return 0; } int diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 808b87b..93c8e84 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -223,7 +223,7 @@ 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; @@ -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/eal_options.h b/lib/librte_eal/common/eal_options.h index f6714d9..59a0f39 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -89,7 +89,7 @@ extern const struct option eal_long_options[]; int eal_parse_common_option(int opt, const char *argv, struct internal_config *conf); -int eal_adjust_config(struct internal_config *internal_cfg); +void eal_adjust_config(struct internal_config *internal_cfg); int eal_check_common_options(struct internal_config *internal_cfg); void eal_common_usage(void); enum rte_proc_type_t eal_proc_type_detect(void); 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..e2a5468 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -621,8 +621,7 @@ eal_parse_args(int argc, char **argv) } } - if (eal_adjust_config(&internal_config) != 0) - return -1; + eal_adjust_config(&internal_config); /* sanity checks */ if (eal_check_common_options(&internal_config) != 0) { @@ -842,8 +841,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