From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0320CA09EF;
	Mon, 11 Jan 2021 02:03:57 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id B8EC3140CCD;
	Mon, 11 Jan 2021 02:03:56 +0100 (CET)
Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35])
 by mails.dpdk.org (Postfix) with ESMTP id BFA52140CCC;
 Mon, 11 Jan 2021 02:03:54 +0100 (CET)
Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60])
 by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4DDb6Q1lClz7SYV;
 Mon, 11 Jan 2021 09:02:54 +0800 (CST)
Received: from [10.67.103.128] (10.67.103.128) by
 DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id
 14.3.498.0; Mon, 11 Jan 2021 09:03:50 +0800
To: Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>, Chas Williams
 <chas3@att.com>, Tomasz Kulasek <tomaszx.kulasek@intel.com>, Declan Doherty
 <declan.doherty@intel.com>
CC: <stable@dpdk.org>
References: <20200824094021.2323605-1-ferruh.yigit@intel.com>
 <20201119115900.4095566-1-ferruh.yigit@intel.com>
 <20201119115900.4095566-7-ferruh.yigit@intel.com>
From: "Min Hu (Connor)" <humin29@huawei.com>
Message-ID: <ffb9c3df-95cf-18f4-8299-aed06144c5cb@huawei.com>
Date: Mon, 11 Jan 2021 09:03:50 +0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.3.1
MIME-Version: 1.0
In-Reply-To: <20201119115900.4095566-7-ferruh.yigit@intel.com>
Content-Type: text/plain; charset="gbk"; format=flowed
Content-Transfer-Encoding: 8bit
X-Originating-IP: [10.67.103.128]
X-CFilter-Loop: Reflected
Subject: Re: [dpdk-dev] [v21.02 v3 06/10] net/bonding: remove local variable
 shadowing outer one
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Acked-by: Min Hu (Connor) <humin29@huawei.com>

在 2020/11/19 19:58, Ferruh Yigit 写道:
> 'retval' is already defined in the function scope, removing the 'retval'
> in the block scope.
> 
> Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: tomaszx.kulasek@intel.com
> ---
>   drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
> index 67ca0730fa..5fe004e551 100644
> --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> @@ -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;
> @@ -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;
>