net: bgmac: remove redundant variable 'freed'
authorColin Ian King <colin.king@canonical.com>
Wed, 4 Jul 2018 07:30:43 +0000 (08:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jul 2018 13:39:11 +0000 (22:39 +0900)
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@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac.c

index e6ea8e61f96ddc17c09a7f90f3f37727ca49f7ca..4c94d9218bba9c75cf8183a8b0feca7a9aaba18c 100644 (file)
@@ -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)