All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Gustavo Arantes <dev.gustavoa@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: convert mutex_lock/unlock to guard and scoped_guard in rtw_pwrctrl.c
Date: Tue, 10 Mar 2026 10:02:01 +0100	[thread overview]
Message-ID: <2026031039-deranged-primal-f6ab@gregkh> (raw)
In-Reply-To: <20260310084806.34265-1-dev.gustavoa@gmail.com>

On Tue, Mar 10, 2026 at 05:48:06AM -0300, Gustavo Arantes wrote:
> Replace simple mutex_lock()/mutex_unlock() pairs with guard(mutex)() and
> scoped_guard(mutex, ...) in rtw_pwrctrl.c, simplifying the locking by
> using cleanup.h guard API which automatically releases the mutex when the
> variable goes out of scope, reducing risks of missing unlocks on error
> paths.
> 
> Signed-off-by: Gustavo Arantes <dev.gustavoa@gmail.com>

Let's not convert existing code to use guard(), but rather use it for
newer code submitted to the kernel.

thanks,

greg k-h

  reply	other threads:[~2026-03-10  9:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10  8:48 [PATCH] staging: rtl8723bs: convert mutex_lock/unlock to guard and scoped_guard in rtw_pwrctrl.c Gustavo Arantes
2026-03-10  9:02 ` Greg KH [this message]
2026-03-10  9:09   ` Gustavo Arantes
2026-03-10  9:25 ` Dan Carpenter

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=2026031039-deranged-primal-f6ab@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dev.gustavoa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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.