net: ethernet: mediatek: remove useless code in mtk_poll_tx()
Subsystems (4)
PATCH 1/1 net: ethernet: mediatek: remove useless code in mtk_poll_tx()
Remove useless local variable _condition_ and the code related.
Signed-off-by Gustavo A. R. Silva <[email protected]>
--- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -4
@@ -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;
Signature · 1 line
2.5.0
Quoted 21 lines · Gustavo A. R. Silva
Remove useless local variable _condition_ and the code related.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/net/ethernet/mediatek/mtk_eth_soc.c +0
-1@@ -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 ;
drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_poll_tx(struct mtk_eth *eth, int budget) · line 1057
Quoted 10 lines
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1
-3skb = 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 <[email protected]>
From: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 18 Jul 2017 15:48:06 -0500
Quoted 3 lines
Remove useless local variable _condition_ and the code related.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied.