staging: octeon: remove redundant variable total_freed
authorColin Ian King <colin.i.king@gmail.com>
Thu, 20 Oct 2022 13:16:09 +0000 (14:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Oct 2022 15:48:40 +0000 (17:48 +0200)
The variable total_freed is accumulating skb_to_free however it is not
being used after this. The use of total_freed is redundant and hence
the variable can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221020131609.1546667-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet-tx.c

index a36e367..bbf33b8 100644 (file)
@@ -73,7 +73,6 @@ static void cvm_oct_free_tx_skbs(struct net_device *dev)
 {
        int skb_to_free;
        int qos, queues_per_port;
-       int total_freed = 0;
        int total_remaining = 0;
        unsigned long flags;
        struct octeon_ethernet *priv = netdev_priv(dev);
@@ -87,7 +86,6 @@ static void cvm_oct_free_tx_skbs(struct net_device *dev)
                                                       MAX_SKB_TO_FREE);
                skb_to_free = cvm_oct_adjust_skb_to_free(skb_to_free,
                                                         priv->fau + qos * 4);
-               total_freed += skb_to_free;
                if (skb_to_free > 0) {
                        struct sk_buff *to_free_list = NULL;