Skip to content

Commit 4d26b6e

Browse files
walacanguy11
authored andcommitted
igbvf: remove unused spinlock
tx_queue_lock and stats_lock are declared and initialized, but never used. Remove them. Signed-off-by: Wander Lairson Costa <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent f40b0ac commit 4d26b6e

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

drivers/net/ethernet/intel/igbvf/igbvf.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ struct igbvf_adapter {
169169
u16 link_speed;
170170
u16 link_duplex;
171171

172-
spinlock_t tx_queue_lock; /* prevent concurrent tail updates */
173-
174172
/* track device up/down/testing state */
175173
unsigned long state;
176174

@@ -220,7 +218,6 @@ struct igbvf_adapter {
220218
/* OS defined structs */
221219
struct net_device *netdev;
222220
struct pci_dev *pdev;
223-
spinlock_t stats_lock; /* prevent concurrent stats updates */
224221

225222
/* structs defined in e1000_hw.h */
226223
struct e1000_hw hw;

drivers/net/ethernet/intel/igbvf/netdev.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,12 +1656,9 @@ static int igbvf_sw_init(struct igbvf_adapter *adapter)
16561656
if (igbvf_alloc_queues(adapter))
16571657
return -ENOMEM;
16581658

1659-
spin_lock_init(&adapter->tx_queue_lock);
1660-
16611659
/* Explicitly disable IRQ since the NIC can be in any state. */
16621660
igbvf_irq_disable(adapter);
16631661

1664-
spin_lock_init(&adapter->stats_lock);
16651662
spin_lock_init(&adapter->hw.mbx_lock);
16661663

16671664
set_bit(__IGBVF_DOWN, &adapter->state);

0 commit comments

Comments
 (0)