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 09/32] scsi: aha1740: 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/aha1740.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
    index 0dc8310..fd9787d 100644
    --- a/drivers/scsi/aha1740.c
    +++ b/drivers/scsi/aha1740.c
    @@ -214,14 +214,13 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
    struct ecb *ecbptr;
    struct scsi_cmnd *SCtmp;
    unsigned int base;
    - unsigned long flags;
    int handled = 0;
    struct aha1740_sg *sgptr;
    struct eisa_device *edev;

    if (!host)
    panic("aha1740.c: Irq from unknown host!\n");
    - spin_lock_irqsave(host->host_lock, flags);
    + spin_lock(host->host_lock);
    base = host->io_port;
    number_serviced = 0;
    edev = HOSTDATA(host)->edev;
    @@ -308,7 +307,7 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
    number_serviced++;
    }

    - spin_unlock_irqrestore(host->host_lock, flags);
    + spin_unlock(host->host_lock);
    return IRQ_RETVAL(handled);
    }

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