From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Niloy Meharchandani <niloymeharchandani@gmail.com>
Cc: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
Christian Gromm <christian.gromm@microchip.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: most: net: use guard(mutex) for probe_disc_mt
Date: Fri, 20 Nov 2026 08:16:55 +0100 [thread overview]
Message-ID: <2026112038-breeding-skinny-7966@gregkh> (raw)
In-Reply-To: <20261114065358.149853-1-niloymeharchandani@gmail.com>
On Fri, Nov 13, 2026 at 10:53:58PM -0800, Niloy Meharchandani wrote:
> Replace manual mutex_lock() and mutex_unlock() calls on probe_disc_mt
> with guard(mutex)(&probe_disc_mt) in most_nd_open(), comp_probe_channel(),
> and comp_disconnect_channel(). Include <linux/cleanup.h> and
> <linux/mutex.h> explicitly.
>
> This simplifies error paths by removing the unlock goto labels and
> temporary return variables while ensuring the mutex is always released
> on scope exit.
>
> No functional change intended. Compile-tested only.
Only do this for new code, never touch existing code like this, it's not
needed.
thanks,
greg k-h
prev parent reply other threads:[~2026-11-20 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 6:53 [PATCH] staging: most: net: use guard(mutex) for probe_disc_mt Niloy Meharchandani
2026-11-20 7:16 ` Greg Kroah-Hartman [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=2026112038-breeding-skinny-7966@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=christian.gromm@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=niloymeharchandani@gmail.com \
--cc=parthiban.veerasooran@microchip.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