bonding: remove useless memset
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 3 Jun 2015 21:13:10 +0000 (14:13 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 4 Jun 2015 08:46:45 +0000 (10:46 +0200)
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 <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
drivers/net/bonding/rte_eth_bond_api.c
drivers/net/bonding/rte_eth_bond_pmd.c

index e91a623..d4caa83 100644 (file)
@@ -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) {
index c937e6b..8bad2e1 100644 (file)
@@ -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);