igbvf: remove unused spinlock
authorWander Lairson Costa <wander@redhat.com>
Fri, 20 Sep 2024 18:59:17 +0000 (15:59 -0300)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 13 Nov 2024 18:30:21 +0000 (10:30 -0800)
tx_queue_lock and stats_lock are declared and initialized, but never
used. Remove them.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igbvf/igbvf.h
drivers/net/ethernet/intel/igbvf/netdev.c

index 6ad35a00a28736e25c1525e14910e17eb8bd5f8f..ca6e44245a7b8b1df9a74c68eff7bb37876ae2e4 100644 (file)
@@ -169,8 +169,6 @@ struct igbvf_adapter {
        u16 link_speed;
        u16 link_duplex;
 
-       spinlock_t tx_queue_lock; /* prevent concurrent tail updates */
-
        /* track device up/down/testing state */
        unsigned long state;
 
@@ -220,7 +218,6 @@ struct igbvf_adapter {
        /* OS defined structs */
        struct net_device *netdev;
        struct pci_dev *pdev;
-       spinlock_t stats_lock; /* prevent concurrent stats updates */
 
        /* structs defined in e1000_hw.h */
        struct e1000_hw hw;
index 925d7286a8ee484edd8cf23906958e314acc56bf..02044aa2181b9774b810d9c9b15493fe28b647f6 100644 (file)
@@ -1656,12 +1656,9 @@ static int igbvf_sw_init(struct igbvf_adapter *adapter)
        if (igbvf_alloc_queues(adapter))
                return -ENOMEM;
 
-       spin_lock_init(&adapter->tx_queue_lock);
-
        /* Explicitly disable IRQ since the NIC can be in any state. */
        igbvf_irq_disable(adapter);
 
-       spin_lock_init(&adapter->stats_lock);
        spin_lock_init(&adapter->hw.mbx_lock);
 
        set_bit(__IGBVF_DOWN, &adapter->state);