All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tuo Cao <91tuocao@gmail.com>
To: James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, khalid@gonehiking.org,
	willy@infradead.org, hare@suse.com
Cc: anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	91tuocao@gmail.com
Subject: [PATCH 9/9] scsi: bfad: move spin_lock_irqsave to spin_lock in interrupt handler
Date: Sun, 14 Aug 2022 14:43:37 +0800	[thread overview]
Message-ID: <20220814064337.32621-10-91tuocao@gmail.com> (raw)
In-Reply-To: <20220814064337.32621-1-91tuocao@gmail.com>

it is unnecessary to call spin_lock_irqsave in a interrupt handler.

Signed-off-by: Tuo Cao <91tuocao@gmail.com>
---
 drivers/scsi/bfa/bfad.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index e5aa982ffedc..3191377d543b 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1086,25 +1086,24 @@ bfad_intx(int irq, void *dev_id)
 {
 	struct bfad_s	*bfad = dev_id;
 	struct list_head	doneq;
-	unsigned long	flags;
 	bfa_boolean_t rc;
 
-	spin_lock_irqsave(&bfad->bfad_lock, flags);
+	spin_lock(&bfad->bfad_lock);
 	rc = bfa_intx(&bfad->bfa);
 	if (!rc) {
-		spin_unlock_irqrestore(&bfad->bfad_lock, flags);
+		spin_unlock(&bfad->bfad_lock);
 		return IRQ_NONE;
 	}
 
 	bfa_comp_deq(&bfad->bfa, &doneq);
-	spin_unlock_irqrestore(&bfad->bfad_lock, flags);
+	spin_unlock(&bfad->bfad_lock);
 
 	if (!list_empty(&doneq)) {
 		bfa_comp_process(&bfad->bfa, &doneq);
 
-		spin_lock_irqsave(&bfad->bfad_lock, flags);
+		spin_lock(&bfad->bfad_lock);
 		bfa_comp_free(&bfad->bfa, &doneq);
-		spin_unlock_irqrestore(&bfad->bfad_lock, flags);
+		spin_unlock(&bfad->bfad_lock);
 	}
 
 	return IRQ_HANDLED;
@@ -1117,20 +1116,19 @@ bfad_msix(int irq, void *dev_id)
 	struct bfad_msix_s *vec = dev_id;
 	struct bfad_s *bfad = vec->bfad;
 	struct list_head doneq;
-	unsigned long   flags;
 
-	spin_lock_irqsave(&bfad->bfad_lock, flags);
+	spin_lock(&bfad->bfad_lock);
 
 	bfa_msix(&bfad->bfa, vec->msix.entry);
 	bfa_comp_deq(&bfad->bfa, &doneq);
-	spin_unlock_irqrestore(&bfad->bfad_lock, flags);
+	spin_unlock(&bfad->bfad_lock);
 
 	if (!list_empty(&doneq)) {
 		bfa_comp_process(&bfad->bfa, &doneq);
 
-		spin_lock_irqsave(&bfad->bfad_lock, flags);
+		spin_lock(&bfad->bfad_lock);
 		bfa_comp_free(&bfad->bfa, &doneq);
-		spin_unlock_irqrestore(&bfad->bfad_lock, flags);
+		spin_unlock(&bfad->bfad_lock);
 	}
 
 	return IRQ_HANDLED;
-- 
2.17.1


      parent reply	other threads:[~2022-08-14  6:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14  6:43 [PATCH 0/9] move spin_lock_irqsave to spin_lock in interrupt handler Tuo Cao
2022-08-14  6:43 ` [PATCH 1/9] scsi: 53c700: " Tuo Cao
2022-08-14  6:43 ` [PATCH 2/9] scsi: a100u2w: " Tuo Cao
2022-08-14  6:43 ` [PATCH 3/9] scsi: a2091: " Tuo Cao
2022-08-14  6:43 ` [PATCH 4/9] scsi: a3000: " Tuo Cao
2022-08-14  6:43 ` [PATCH 5/9] scsi: BusLogic: " Tuo Cao
2022-08-14  6:43 ` [PATCH 6/9] scsi: advansys: " Tuo Cao
2022-08-14  6:43 ` [PATCH 7/9] scsi: aha1542: " Tuo Cao
2022-08-14  6:43 ` [PATCH 8/9] scsi: aha1740: " Tuo Cao
2022-08-14  6:43 ` Tuo Cao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220814064337.32621-10-91tuocao@gmail.com \
    --to=91tuocao@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=anil.gurumurthy@qlogic.com \
    --cc=hare@suse.com \
    --cc=khalid@gonehiking.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sudarsana.kalluru@qlogic.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.