net: ethernet: mediatek: remove useless code in mtk_poll_tx()
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 18 Jul 2017 20:48:06 +0000 (15:48 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jul 2017 23:33:57 +0000 (16:33 -0700)
Remove useless local variable _condition_ and the code related.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index b3d0c2e6347a636aa23a6f637233d27d7b55f646..7e95cf547ff12d15d89307ceab59a6be2f66b2e3 100644 (file)
@@ -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;