drivers: remove useless reset of PCI device pointer
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 23 Dec 2016 15:57:55 +0000 (16:57 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 24 Dec 2016 17:47:19 +0000 (18:47 +0100)
Since rte_eth_dev_info_get does memset() on dev_info before
calling device specific code, the explicit assignment of NULL
in all these virtual drivers has no effect.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jan Blunck <jblunck@infradead.org>
app/test/virtual_pmd.c
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/null/rte_eth_null.c
drivers/net/pcap/rte_eth_pcap.c
drivers/net/ring/rte_eth_ring.c
drivers/net/xenvirt/rte_eth_xenvirt.c

index bd969f9..2517208 100644 (file)
@@ -117,7 +117,6 @@ virtual_ethdev_info_get(struct rte_eth_dev *dev __rte_unused,
        dev_info->max_tx_queues = (uint16_t)512;
 
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 }
 
 static int
index ff45068..2951f86 100644 (file)
@@ -287,7 +287,6 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        dev_info->max_rx_queues = (uint16_t)internals->nb_queues;
        dev_info->max_tx_queues = (uint16_t)internals->nb_queues;
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 }
 
 static void
index b604642..c1796f2 100644 (file)
@@ -1672,7 +1672,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        dev_info->max_tx_queues = (uint16_t)512;
 
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 
        dev_info->rx_offload_capa = internals->rx_offload_capa;
        dev_info->tx_offload_capa = internals->tx_offload_capa;
index f09caf1..0b6715e 100644 (file)
@@ -301,7 +301,6 @@ eth_dev_info(struct rte_eth_dev *dev,
        dev_info->max_rx_queues = RTE_DIM(internals->rx_null_queues);
        dev_info->max_tx_queues = RTE_DIM(internals->tx_null_queues);
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
        dev_info->reta_size = internals->reta_size;
        dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
 }
index 0162f44..7253b9a 100644 (file)
@@ -559,7 +559,6 @@ eth_dev_info(struct rte_eth_dev *dev,
        dev_info->max_rx_queues = dev->data->nb_rx_queues;
        dev_info->max_tx_queues = dev->data->nb_tx_queues;
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 }
 
 static void
index c7726f4..975956a 100644 (file)
@@ -179,7 +179,6 @@ eth_dev_info(struct rte_eth_dev *dev,
        dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues;
        dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues;
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 }
 
 static void
index c08a056..609824b 100644 (file)
@@ -337,7 +337,6 @@ eth_dev_info(struct rte_eth_dev *dev,
        dev_info->max_rx_queues = (uint16_t)1;
        dev_info->max_tx_queues = (uint16_t)1;
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 }
 
 static void