lkml.org 
[lkml]   [2021]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH for-next 21/32] scsi: myrs: Replace spin_lock_irqsave with spin_lock in hard IRQ
Date
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@huawei.com>
---
drivers/scsi/myrs.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 4adf9de..59379fc 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -2615,9 +2615,8 @@ static irqreturn_t DAC960_GEM_intr_handler(int irq, void *arg)
struct myrs_hba *cs = arg;
void __iomem *base = cs->io_base;
struct myrs_stat_mbox *next_stat_mbox;
- unsigned long flags;

- spin_lock_irqsave(&cs->queue_lock, flags);
+ spin_lock(&cs->queue_lock);
DAC960_GEM_ack_intr(base);
next_stat_mbox = cs->next_stat_mbox;
while (next_stat_mbox->id > 0) {
@@ -2654,7 +2653,7 @@ static irqreturn_t DAC960_GEM_intr_handler(int irq, void *arg)
}
}
cs->next_stat_mbox = next_stat_mbox;
- spin_unlock_irqrestore(&cs->queue_lock, flags);
+ spin_unlock(&cs->queue_lock);
return IRQ_HANDLED;
}

@@ -2865,9 +2864,8 @@ static irqreturn_t DAC960_BA_intr_handler(int irq, void *arg)
struct myrs_hba *cs = arg;
void __iomem *base = cs->io_base;
struct myrs_stat_mbox *next_stat_mbox;
- unsigned long flags;

- spin_lock_irqsave(&cs->queue_lock, flags);
+ spin_lock(&cs->queue_lock);
DAC960_BA_ack_intr(base);
next_stat_mbox = cs->next_stat_mbox;
while (next_stat_mbox->id > 0) {
@@ -2904,7 +2902,7 @@ static irqreturn_t DAC960_BA_intr_handler(int irq, void *arg)
}
}
cs->next_stat_mbox = next_stat_mbox;
- spin_unlock_irqrestore(&cs->queue_lock, flags);
+ spin_unlock(&cs->queue_lock);
return IRQ_HANDLED;
}

@@ -3115,9 +3113,8 @@ static irqreturn_t DAC960_LP_intr_handler(int irq, void *arg)
struct myrs_hba *cs = arg;
void __iomem *base = cs->io_base;
struct myrs_stat_mbox *next_stat_mbox;
- unsigned long flags;

- spin_lock_irqsave(&cs->queue_lock, flags);
+ spin_lock(&cs->queue_lock);
DAC960_LP_ack_intr(base);
next_stat_mbox = cs->next_stat_mbox;
while (next_stat_mbox->id > 0) {
@@ -3154,7 +3151,7 @@ static irqreturn_t DAC960_LP_intr_handler(int irq, void *arg)
}
}
cs->next_stat_mbox = next_stat_mbox;
- spin_unlock_irqrestore(&cs->queue_lock, flags);
+ spin_unlock(&cs->queue_lock);
return IRQ_HANDLED;
}

--
2.8.1
\
 
 \ /
  Last update: 2021-02-07 12:53    [W:0.338 / U:6.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site