mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Avri Altman <avri.altman@wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] simplify ufshcd with the guard() macro
Date: Tue, 16 Apr 2024 12:16:00 -0700	[thread overview]
Message-ID: <2bbd7e84-aee3-4c36-9cae-791b4f4d5a82@acm.org> (raw)
In-Reply-To: <20240416102348.614-1-avri.altman@wdc.com>

On 4/16/24 03:23, Avri Altman wrote:
> We can simplify the code with the guard() macro and co for  automatic
> cleanup of locks. For making changes easier, this series is divided to
> per-lock type patches and only address the ufshcd module. There are
> still a few remaining explicit lock/unlock calls, and those are for the
> places where we do temporary unlock/relock, which doesn't fit well with
> the guard(), so far.

Why to use only the existing primitives? Several error paths could be 
eliminated if new macros would be included for e.g. automatically
calling ufshcd_release() at the end of a scope.

Bart.


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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 10:23 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 ` [PATCH 3/4] scsi: ufs: core: Make use of guard(spinlock_irq) Avri Altman
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 ` Bart Van Assche [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=2bbd7e84-aee3-4c36-9cae-791b4f4d5a82@acm.org \
    --to=bvanassche@acm.org \
    --cc=avri.altman@wdc.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®