[PATCH] net: bgmac: remove redundant variable 'freed'

From: Colin King
Date: Wed Jul 04 2018 - 03:30:51 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Variable 'freed' is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'freed' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
drivers/net/ethernet/broadcom/bgmac.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index e6ea8e61f96d..4c94d9218bba 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -236,7 +236,6 @@ static void bgmac_dma_tx_free(struct bgmac *bgmac, struct bgmac_dma_ring *ring)
{
struct device *dma_dev = bgmac->dma_dev;
int empty_slot;
- bool freed = false;
unsigned bytes_compl = 0, pkts_compl = 0;

/* The last slot that hardware didn't consume yet */
@@ -279,7 +278,6 @@ static void bgmac_dma_tx_free(struct bgmac *bgmac, struct bgmac_dma_ring *ring)

slot->dma_addr = 0;
ring->start++;
- freed = true;
}

if (!pkts_compl)
--
2.17.1