Skip to content

Commit

Permalink
net/bonding: remove local variable shadowing outer one
Browse files Browse the repository at this point in the history
[ upstream commit b92b001 ]

'retval' is already defined in the function scope, removing the 'retval'
in the block scope.

Fixes: 112891c ("net/bonding: add dedicated HW queues for LACP control")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
Ferruh Yigit authored and cpaelzer committed Feb 2, 2021
1 parent 9000db4 commit 42179ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/bonding/rte_eth_bond_8023ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
rte_eth_macaddr_get(slave_id, &m_hdr->eth_hdr.s_addr);

if (internals->mode4.dedicated_queues.enabled == 0) {
int retval = rte_ring_enqueue(port->tx_ring, pkt);
if (retval != 0) {
if (rte_ring_enqueue(port->tx_ring, pkt) != 0) {
/* reset timer */
port->rx_marker_timer = 0;
wrn = WRN_TX_QUEUE_FULL;
Expand All @@ -1355,8 +1354,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
}
} else if (likely(subtype == SLOW_SUBTYPE_LACP)) {
if (internals->mode4.dedicated_queues.enabled == 0) {
int retval = rte_ring_enqueue(port->rx_ring, pkt);
if (retval != 0) {
if (rte_ring_enqueue(port->rx_ring, pkt) != 0) {
/* If RX fing full free lacpdu message and drop packet */
wrn = WRN_RX_QUEUE_FULL;
goto free_out;
Expand Down

0 comments on commit 42179ec

Please sign in to comment.