All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avri Altman <avri.altman@wdc.com>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Bart Van Assche <bvanassche@acm.org>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Avri Altman <avri.altman@wdc.com>
Subject: [PATCH 3/4] scsi: ufs: core: Make use of guard(spinlock_irq)
Date: Tue, 16 Apr 2024 13:23:47 +0300	[thread overview]
Message-ID: <20240416102348.614-4-avri.altman@wdc.com> (raw)
In-Reply-To: <20240416102348.614-1-avri.altman@wdc.com>

Replace open-coded handling with cleanup.h guard(spinlock_irq).

Signed-off-by: Avri Altman <avri.altman@wdc.com>
---
 drivers/ufs/core/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 92ac6a358365..3c62b69bbd52 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -6309,10 +6309,9 @@ void ufshcd_schedule_eh_work(struct ufs_hba *hba)
 
 static void ufshcd_force_error_recovery(struct ufs_hba *hba)
 {
-	spin_lock_irq(hba->host->host_lock);
+	guard(spinlock_irq)(hba->host->host_lock);
 	hba->force_reset = true;
 	ufshcd_schedule_eh_work(hba);
-	spin_unlock_irq(hba->host->host_lock);
 }
 
 static void ufshcd_clk_scaling_allow(struct ufs_hba *hba, bool allow)
-- 
2.42.0


  parent reply	other threads:[~2024-04-16 10:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 10:23 [PATCH 0/4] simplify ufshcd with the guard() macro Avri Altman
2024-04-16 10:23 ` [PATCH 1/4] scsi: ufs: core: Make use of guard(spinlock_irqsave) Avri Altman
2024-04-16 19:18   ` Bart Van Assche
2024-04-17  6:39     ` Avri Altman
2024-04-16 10:23 ` [PATCH 2/4] scsi: ufs: core: Make use of guard(spinlock) Avri Altman
2024-04-16 10:23 ` Avri Altman [this message]
2024-04-16 10:23 ` [PATCH 4/4] scsi: ufs: core: Make use of guard(mutex) Avri Altman
2024-04-16 19:20   ` Bart Van Assche
2024-04-16 19:16 ` [PATCH 0/4] simplify ufshcd with the guard() macro Bart Van Assche

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=20240416102348.614-4-avri.altman@wdc.com \
    --to=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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.