[PATCH for-next 20/32] scsi: myrb: Replace spin_lock_irqsave with spin_lock in hard IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.

Signed-off-by: Xiaofei Tan <tanxiaofei@xxxxxxxxxx>
---
 drivers/scsi/myrb.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index 3d8e91c..ecb57ee 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -2769,9 +2769,8 @@ static irqreturn_t DAC960_LA_intr_handler(int irq, void *arg)
 	struct myrb_hba *cb = arg;
 	void __iomem *base = cb->io_base;
 	struct myrb_stat_mbox *next_stat_mbox;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cb->queue_lock, flags);
+	spin_lock(&cb->queue_lock);
 	DAC960_LA_ack_intr(base);
 	next_stat_mbox = cb->next_stat_mbox;
 	while (next_stat_mbox->valid) {
@@ -2806,7 +2805,7 @@ static irqreturn_t DAC960_LA_intr_handler(int irq, void *arg)
 		}
 	}
 	cb->next_stat_mbox = next_stat_mbox;
-	spin_unlock_irqrestore(&cb->queue_lock, flags);
+	spin_unlock(&cb->queue_lock);
 	return IRQ_HANDLED;
 }
 
@@ -3047,9 +3046,8 @@ static irqreturn_t DAC960_PG_intr_handler(int irq, void *arg)
 	struct myrb_hba *cb = arg;
 	void __iomem *base = cb->io_base;
 	struct myrb_stat_mbox *next_stat_mbox;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cb->queue_lock, flags);
+	spin_lock(&cb->queue_lock);
 	DAC960_PG_ack_intr(base);
 	next_stat_mbox = cb->next_stat_mbox;
 	while (next_stat_mbox->valid) {
@@ -3082,7 +3080,7 @@ static irqreturn_t DAC960_PG_intr_handler(int irq, void *arg)
 			myrb_handle_scsi(cb, cmd_blk, scmd);
 	}
 	cb->next_stat_mbox = next_stat_mbox;
-	spin_unlock_irqrestore(&cb->queue_lock, flags);
+	spin_unlock(&cb->queue_lock);
 	return IRQ_HANDLED;
 }
 
@@ -3254,9 +3252,8 @@ static irqreturn_t DAC960_PD_intr_handler(int irq, void *arg)
 {
 	struct myrb_hba *cb = arg;
 	void __iomem *base = cb->io_base;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cb->queue_lock, flags);
+	spin_lock(&cb->queue_lock);
 	while (DAC960_PD_hw_mbox_status_available(base)) {
 		unsigned char id = DAC960_PD_read_status_cmd_ident(base);
 		struct scsi_cmnd *scmd = NULL;
@@ -3285,7 +3282,7 @@ static irqreturn_t DAC960_PD_intr_handler(int irq, void *arg)
 		else
 			myrb_handle_scsi(cb, cmd_blk, scmd);
 	}
-	spin_unlock_irqrestore(&cb->queue_lock, flags);
+	spin_unlock(&cb->queue_lock);
 	return IRQ_HANDLED;
 }
 
@@ -3420,9 +3417,8 @@ static irqreturn_t DAC960_P_intr_handler(int irq, void *arg)
 {
 	struct myrb_hba *cb = arg;
 	void __iomem *base = cb->io_base;
-	unsigned long flags;
 
-	spin_lock_irqsave(&cb->queue_lock, flags);
+	spin_lock(&cb->queue_lock);
 	while (DAC960_PD_hw_mbox_status_available(base)) {
 		unsigned char id = DAC960_PD_read_status_cmd_ident(base);
 		struct scsi_cmnd *scmd = NULL;
@@ -3483,7 +3479,7 @@ static irqreturn_t DAC960_P_intr_handler(int irq, void *arg)
 		else
 			myrb_handle_scsi(cb, cmd_blk, scmd);
 	}
-	spin_unlock_irqrestore(&cb->queue_lock, flags);
+	spin_unlock(&cb->queue_lock);
 	return IRQ_HANDLED;
 }
 
-- 
2.8.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux