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 31/32] scsi: wd719x: 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/wd719x.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
index edc8a13..ef372f3 100644
--- a/drivers/scsi/wd719x.c
+++ b/drivers/scsi/wd719x.c
@@ -657,10 +657,9 @@ static irqreturn_t wd719x_interrupt(int irq, void *dev_id)
{
struct wd719x *wd = dev_id;
union wd719x_regs regs;
- unsigned long flags;
u32 SCB_out;

- spin_lock_irqsave(wd->sh->host_lock, flags);
+ spin_lock(wd->sh->host_lock);
/* read SCB pointer back from card */
SCB_out = wd719x_readl(wd, WD719X_AMR_SCB_OUT);
/* read all status info at once */
@@ -668,7 +667,7 @@ static irqreturn_t wd719x_interrupt(int irq, void *dev_id)

switch (regs.bytes.INT) {
case WD719X_INT_NONE:
- spin_unlock_irqrestore(wd->sh->host_lock, flags);
+ spin_unlock(wd->sh->host_lock);
return IRQ_NONE;
case WD719X_INT_LINKNOSTATUS:
dev_err(&wd->pdev->dev, "linked command completed with no status\n");
@@ -705,7 +704,7 @@ static irqreturn_t wd719x_interrupt(int irq, void *dev_id)
}
/* clear interrupt so another can happen */
wd719x_writeb(wd, WD719X_AMR_INT_STATUS, WD719X_INT_NONE);
- spin_unlock_irqrestore(wd->sh->host_lock, flags);
+ spin_unlock(wd->sh->host_lock);

return IRQ_HANDLED;
}
--
2.8.1
\
 
 \ /
  Last update: 2021-02-07 12:50    [W:0.230 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site