Skip to contentSkip to conversation

net/bonding: remove useless assignment

PATCH Applied Emmanuel Roullit 3 participants 4 messages Jan 24, 2017 – Feb 14, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bonding: remove useless assignment

Found with clang static analysis:
drivers/net/bonding/rte_eth_bond_pmd.c:903:3:
warning: Value stored to 'num_not_send' is never read

        num_not_send += slave_bufs_pkts[RTE_MAX_ETHPORTS] - num_send;
        ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes 73db5badb042 ("net: align ethdev and eal driver names")
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/bonding/rte_eth_bond_pmd.c +0 -1
index 02e34483f..f3ac9e273 100644
@@ -900,7 +900,6 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		}
 
 		num_tx_total += num_send;
-		num_not_send += slave_bufs_pkts[RTE_MAX_ETHPORTS] - num_send;
 	}
 
 	return num_tx_total;
Signature · 1 line
2.11.0
Applied
#1 lore raw
Quoted 9 lines · Emmanuel Roullit

Found with clang static analysis:
drivers/net/bonding/rte_eth_bond_pmd.c:903:3:
warning: Value stored to 'num_not_send' is never read

        num_not_send += slave_bufs_pkts[RTE_MAX_ETHPORTS] - num_send;
        ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes 73db5badb042 ("net: align ethdev and eal driver names")

Applied to dpdk-next-net/master, thanks.

#2 lore raw
Quoted 7 lines · Ferruh Yigit
Quoted 6 lines · Emmanuel Roullit

Found with clang static analysis:
drivers/net/bonding/rte_eth_bond_pmd.c:903:3:
warning: Value stored to 'num_not_send' is never read

        num_not_send += slave_bufs_pkts[RTE_MAX_ETHPORTS] - num_send;
        ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 5 lines
Quoted 3 lines
Fixes 73db5badb042 ("net: align ethdev and eal driver names")

Applied to dpdk-next-net/master, thanks.

Fixes 06fe78b98ccd ("bond: add mode 6")
#3 lore raw
Quoted 8 lines · Ferruh Yigit
Quoted 7 lines · Ferruh Yigit
Quoted 6 lines · Emmanuel Roullit

Found with clang static analysis:
drivers/net/bonding/rte_eth_bond_pmd.c:903:3:
warning: Value stored to 'num_not_send' is never read

        num_not_send += slave_bufs_pkts[RTE_MAX_ETHPORTS] - num_send;
        ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Fixes 73db5badb042 ("net: align ethdev and eal driver names")

Applied to dpdk-next-net/master, thanks.

Fixes 06fe78b98ccd ("bond: add mode 6")

For the same reason (it didn't fix a real bug), I will drop it to a stable release.

	--yliu