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

From: Xiaofei Tan
Date: Sun Feb 07 2021 - 06:47:26 EST


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/esp_scsi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 007ccef..1e44fb5 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2175,10 +2175,9 @@ static void __esp_interrupt(struct esp *esp)
irqreturn_t scsi_esp_intr(int irq, void *dev_id)
{
struct esp *esp = dev_id;
- unsigned long flags;
irqreturn_t ret;

- spin_lock_irqsave(esp->host->host_lock, flags);
+ spin_lock(esp->host->host_lock);
ret = IRQ_NONE;
if (esp->ops->irq_pending(esp)) {
ret = IRQ_HANDLED;
@@ -2198,7 +2197,7 @@ irqreturn_t scsi_esp_intr(int irq, void *dev_id)
break;
}
}
- spin_unlock_irqrestore(esp->host->host_lock, flags);
+ spin_unlock(esp->host->host_lock);

return ret;
}
--
2.8.1