From: Stephen Hemminger Date: Wed, 3 Jun 2015 21:13:10 +0000 (-0700) Subject: bonding: remove useless memset X-Git-Tag: spdx-start~9137 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e46e3ba5f0e2e379cc7c9143df6c56e7ec9c0fda;p=dpdk.git bonding: remove useless memset Remove 2 unneeded memset's. The info area is already cleared rte_eth_dev_info_get and the statistics buffer is cleared by rte_eth_stats_get Signed-off-by: Stephen Hemminger Acked-by: Thomas Monjalon --- diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index e91a623406..d4caa83717 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -363,7 +363,6 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) /* Add slave details to bonded device */ slave_add(internals, slave_eth_dev); - memset(&dev_info, 0, sizeof(dev_info)); rte_eth_dev_info_get(slave_port_id, &dev_info); if (internals->slave_count < 1) { diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c937e6b074..8bad2e18cc 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1730,12 +1730,8 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { struct bond_dev_private *internals = dev->data->dev_private; struct rte_eth_stats slave_stats; - int i; - /* clear bonded stats before populating from slaves */ - memset(stats, 0, sizeof(*stats)); - for (i = 0; i < internals->slave_count; i++) { rte_eth_stats_get(internals->slaves[i].port_id, &slave_stats);