[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220814064337.32621-8-91tuocao@gmail.com>
Date: Sun, 14 Aug 2022 14:43:35 +0800
From: Tuo Cao <91tuocao@...il.com>
To: James.Bottomley@...senPartnership.com, martin.petersen@...cle.com,
khalid@...ehiking.org, willy@...radead.org, hare@...e.com
Cc: anil.gurumurthy@...gic.com, sudarsana.kalluru@...gic.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
91tuocao@...il.com
Subject: [PATCH 7/9] scsi: aha1542: move spin_lock_irqsave to spin_lock in interrupt handler
it is unnecessary to call spin_lock_irqsave in a interrupt handler.
Signed-off-by: Tuo Cao <91tuocao@...il.com>
---
drivers/scsi/aha1542.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 552ca95157da..b49082bc5b54 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -281,7 +281,6 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
struct aha1542_hostdata *aha1542 = shost_priv(sh);
int errstatus, mbi, mbo, mbistatus;
int number_serviced;
- unsigned long flags;
struct scsi_cmnd *tmp_cmd;
int flag;
struct mailbox *mb = aha1542->mb;
@@ -306,7 +305,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
#endif
number_serviced = 0;
- spin_lock_irqsave(sh->host_lock, flags);
+ spin_lock(sh->host_lock);
while (1) {
flag = inb(INTRFLAGS(sh->io_port));
@@ -339,7 +338,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
} while (mbi != aha1542->aha1542_last_mbi_used);
if (mb[mbi].status == 0) {
- spin_unlock_irqrestore(sh->host_lock, flags);
+ spin_unlock(sh->host_lock);
/* Hmm, no mail. Must have read it the last time around */
if (!number_serviced)
shost_printk(KERN_WARNING, sh, "interrupt received, but no mail.\n");
@@ -367,7 +366,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
tmp_cmd = aha1542->int_cmds[mbo];
if (!tmp_cmd) {
- spin_unlock_irqrestore(sh->host_lock, flags);
+ spin_unlock(sh->host_lock);
shost_printk(KERN_WARNING, sh, "Unexpected interrupt\n");
shost_printk(KERN_WARNING, sh, "tarstat=%x, hastat=%x idlun=%x ccb#=%d\n", ccb[mbo].tarstat,
ccb[mbo].hastat, ccb[mbo].idlun, mbo);
--
2.17.1
Powered by blists - more mailing lists