[dpdk-dev] [PATCH 2/2] sched/malloc: remove unnecesary return statements
Stephen Hemminger
stephen at networkplumber.org
Thu Dec 8 02:47:51 CET 2016
return statements at end of void functions are unnecessary and unwanted.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
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 a80b6fa..05afcee 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 f4a8835..09970b0 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 010d752..d432fdf 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.10.2
More information about the dev
mailing list