smc911x: Unneeded spinlocks around smc911x_enable
Subsystems (2)
PATCH 6/12 smc911x: Unneeded spinlocks around smc911x_enable
smc911x_enable, which enables irqs as a last task, is called with irqs disabled. There is no any other concurrent access at that phase so spinlock protection is unneeded...
Signed-off-by Bora Sahin <[email protected]>
drivers/net/smc911x.c +0 -4
@@ -345,12 +348,10 @@SMC_SET_FIFO_TSL (64 );SMC_SET_GPT_CFG (GPT_CFG_TIMER_EN_ |10000 ); -spin_lock_irqsave (&lp->lock, flags);SMC_GET_MAC_CR (cr); cr |=MAC_CR_TXEN_ |MAC_CR_HBDIS_ ;SMC_SET_MAC_CR (cr);SMC_SET_TX_CFG (TX_CFG_TX_ON_ ); -spin_unlock_irqrestore (&lp->lock, flags);/* Add 2 byte padding to start of packets */ SMC_SET_RX_CFG ((2 <<8 ) &RX_CFG_RXDOFF_ );
@@ -359,9 +360,7 @@if (cr &MAC_CR_RXEN_ )DBG (SMC_DEBUG_RX ,"%s: Receiver already enabled\n" , dev->name); -spin_lock_irqsave (&lp->lock, flags);SMC_SET_MAC_CR ( cr |MAC_CR_RXEN_ ); -spin_unlock_irqrestore (&lp->lock, flags);/* Interrupt on every received packet */ SMC_SET_FIFO_RSA (0x01 );
[email protected] <[email protected]> :
[...]
Quoted 1 line
is unneeded...
[...]
Review
Quoted 1 line
(quoted diff) +0
-1- spin_lock_irqsave(&lp->lock, flags);
The variable "flags" is not used any more.
Signature · 1 line
Ueimor