Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbdGSDXI (ORCPT ); Tue, 18 Jul 2017 23:23:08 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:45975 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751560AbdGSDXG (ORCPT ); Tue, 18 Jul 2017 23:23:06 -0400 Message-ID: <1500434581.19736.12.camel@mtkswgap22> Subject: Re: [PATCH] net: ethernet: mediatek: remove useless code in mtk_poll_tx() From: Sean Wang To: "Gustavo A. R. Silva" CC: Felix Fietkau , John Crispin , Matthias Brugger , , , , Date: Wed, 19 Jul 2017 11:23:01 +0800 In-Reply-To: <20170718204805.GA30888@embeddedgus> References: <20170718204805.GA30888@embeddedgus> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 38 On Tue, 2017-07-18 at 15:48 -0500, Gustavo A. R. Silva wrote: > Remove useless local variable _condition_ and the code related. > > Signed-off-by: Gustavo A. R. Silva > --- > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > index b3d0c2e..7e95cf5 100644 > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > @@ -1027,7 +1027,6 @@ static int mtk_poll_tx(struct mtk_eth *eth, int budget) > unsigned int done[MTK_MAX_DEVS]; > unsigned int bytes[MTK_MAX_DEVS]; > u32 cpu, dma; > - static int condition; > int total = 0, i; > > memset(done, 0, sizeof(done)); > @@ -1051,10 +1050,8 @@ static int mtk_poll_tx(struct mtk_eth *eth, int budget) > mac = 1; > > skb = tx_buf->skb; > - if (!skb) { > - condition = 1; > + if (!skb) > break; > - } > > if (skb != (struct sk_buff *)MTK_DMA_DUMMY_DESC) { > bytes[mac] += skb->len; Acked-by: Sean Wang