From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 1/7] bonding, malloc, bitmap: remove useless return Date: Mon, 9 Jan 2017 15:30:16 -0800 Message-ID: <20170109233022.31154-2-stephen@networkplumber.org> References: <20170109233022.31154-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id 76C50326C for ; Tue, 10 Jan 2017 00:30:31 +0100 (CET) Received: by mail-pf0-f169.google.com with SMTP id f144so25714172pfa.2 for ; Mon, 09 Jan 2017 15:30:31 -0800 (PST) In-Reply-To: <20170109233022.31154-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" return statements at end of void functions are unnecessary and unwanted. Signed-off-by: Stephen Hemminger --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- lib/librte_eal/common/rte_malloc.c | 1 - lib/librte_sched/rte_bitmap.h | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c1796f22..dd9cfa47 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -241,8 +241,8 @@ arp_op_name(uint16_t arp_op, char *buf) default: break; } + snprintf(buf, sizeof("Unknown"), "%s", "Unknown"); - return; } #endif #define MaxIPv4String 16 diff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c index f4a88352..09970b06 100644 --- a/lib/librte_eal/common/rte_malloc.c +++ b/lib/librte_eal/common/rte_malloc.c @@ -232,7 +232,6 @@ rte_malloc_dump_stats(FILE *f, __rte_unused const char *type) fprintf(f, "\tAlloc_count:%u,\n",sock_stats.alloc_count); fprintf(f, "\tFree_count:%u,\n", sock_stats.free_count); } - return; } /* diff --git a/lib/librte_sched/rte_bitmap.h b/lib/librte_sched/rte_bitmap.h index 010d752c..d432fdfe 100644 --- a/lib/librte_sched/rte_bitmap.h +++ b/lib/librte_sched/rte_bitmap.h @@ -453,8 +453,6 @@ rte_bitmap_clear(struct rte_bitmap *bmp, uint32_t pos) offset1 = (pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2) & RTE_BITMAP_SLAB_BIT_MASK; slab1 = bmp->array1 + index1; *slab1 &= ~(1lu << offset1); - - return; } static inline int -- 2.11.0