This functions always returned 0 and therefore should be void. Signed-off-by: Stephen Hemminger <stephen at networkplumber.org> --- 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