From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Matvey Oborotov <oborotovmatvey@gmail.com>
Cc: Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: Use guard(mutex) in receive_data()
Date: Wed, 25 Feb 2026 06:54:57 -0800 [thread overview]
Message-ID: <2026022526-swimmer-gloomy-8f29@gregkh> (raw)
In-Reply-To: <20260225103006.295553-1-oborotovmatvey@gmail.com>
On Wed, Feb 25, 2026 at 03:30:06PM +0500, Matvey Oborotov wrote:
> Replace manual mutex_lock/unlock with guard(mutex) in raw.c
> receive_data(). This automates lock release on function exit, ensures
> that lock is released on early returns, and makes the code cleaner.
>
> Signed-off-by: Matvey Oborotov <oborotovmatvey@gmail.com>
> ---
> drivers/staging/greybus/raw.c | 16 +++++-----------
> 1 file changed, 5 insertions(+), 11 deletions(-)
Please only use guard() logic with new code, or if you are fixing a bug.
Making changes like this to existing code is not needed at all, it just
causes unwanted churn for no good reason.
sorry,
greg k-h
prev parent reply other threads:[~2026-02-25 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 10:30 Matvey Oborotov
2026-02-25 14:54 ` 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=2026022526-swimmer-gloomy-8f29@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=oborotovmatvey@gmail.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®