From: Greg KH <gregkh@linuxfoundation.org>
To: Erick Karanja <karanja99erick@gmail.com>
Cc: julia.lawall@inria.fr, philipp.g.hortmann@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] staging: rtl8723bs: Use scoped_guard for mutex handling
Date: Fri, 25 Apr 2025 07:10:45 +0200 [thread overview]
Message-ID: <2025042511-dose-rage-4c72@gregkh> (raw)
In-Reply-To: <cover.1745523325.git.karanja99erick@gmail.com>
On Thu, Apr 24, 2025 at 10:56:24PM +0300, Erick Karanja wrote:
> This patchset updates the rtl8723bs driver by replacing manual mutex lock and
> unlock operations with scoped_guard(), aiming to improve code clarity and
> safety through automatic resource management. This change makes the code
> more resilient to early returns and error paths.
But the places you changed do not have early returns or error paths, so
this really is just unneeded churn :(
scope_guard() is great, please use it for new code, or for places with
lots of returns or error paths. But not for just general "let's convert
the driver to use this!" type of things, as that's not needed at all.
Also, for changes like this, I'd like to see the code actually tested to
verify it all is still working properly, as mistakes here can be very
common to cause.
thanks,
greg k-h
prev parent reply other threads:[~2025-04-25 5:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 19:56 [PATCH 0/2] staging: rtl8723bs: Use scoped_guard for mutex handling Erick Karanja
2025-04-24 19:56 ` [PATCH 1/2] staging: rtl8723bs: Replace manual mutex handling with scoped_guard() Erick Karanja
2025-04-24 19:56 ` [PATCH 2/2] staging: rtl8723bs: Switch mutexes to scoped_guard Erick Karanja
2025-04-25 5:10 ` Greg KH [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=2025042511-dose-rage-4c72@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=julia.lawall@inria.fr \
--cc=karanja99erick@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=philipp.g.hortmann@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