From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Mark Pearson <mpearson-lenovo@squebb.ca>,
"Derek J. Clark" <derekjohn.clark@gmail.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Hans de Goede <hansg@kernel.org>,
Nitin Joshi <nitjoshi@gmail.com>,
platform-driver-x86@vger.kernel.org,
ibm-acpi-devel@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] platform/x86: thinkpad_acpi: convert mutex_lock() to guard(mutex)
Date: Tue, 29 Sep 2026 22:06:18 -0700 [thread overview]
Message-ID: <aryYOI92NRUGT-4F@google.com> (raw)
In-Reply-To: <15bd7fc2-ea2c-95fe-330f-6dcb005239c9@linux.intel.com>
Hi Ilpo,
On Tue, Sep 15, 2026 at 02:33:27PM +0300, Ilpo Järvinen wrote:
> On Wed, 5 Aug 2026, Dmitry Torokhov wrote:
>
> > Convert straightforward mutex_lock() and mutex_unlock() usages for
> > hotkey_mutex, tpacpi_inputdev_send_mutex, kbdlight_mutex, lcdshadow_dev
> > lock, and dytc_mutex to guard(mutex) and scoped_guard(mutex) helpers
> > from linux/cleanup.h.
> >
> > This improves code readability and ensures that mutexes are
> > automatically released when exiting their respective scopes.
> >
> > Assisted-by: Antigravity:gemini-3.6-flash
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> Hi,
>
> I've now applied this patch 1 into the review-ilpo-next branch. I
> converted the newly added mutex_lock/unlock() pair in hotkey_poll_setup()
> while at it but it would have been nice if you'd have made them a series
> instead and done that for me as there was unclear dependency between the
> input_device_enabled() change and this one because of the newly added
> mutex_lock/unlock() pair. Hopefully the next time. :-)
>
> Patch 2 seems contested and changes behavior without telling upfront. And
> a return value change shouldn't be hidden into otherwise mechanical
> conversion patch like that anyway. The change is generally good otherwise
> so please resend it once the return value thing is addressed.
Sorry about this, that was my oversight and not an intentional change. I
reverted to reporting '0' even if something fails inside of
brightness_get().
>
> Sashiko complains about the strscpy() placement in patch 3 and that looks
> valid concern to me.
Fixed up as well. I just sent out updated series.
Thanks.
--
Dmitry
prev parent reply other threads:[~2026-09-30 5:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 6:19 Dmitry Torokhov
2026-08-06 6:19 ` [PATCH 2/3] platform/x86: thinkpad_acpi: convert conditional mutex locks to ACQUIRE_ERR() Dmitry Torokhov
2026-08-12 18:53 ` Mark Pearson
2026-09-06 13:10 ` Ali Ahmet Memiş
2026-08-06 6:19 ` [PATCH 3/3] platform/x86: thinkpad_acpi: use __free(kfree) for automatic cleanup Dmitry Torokhov
2026-08-12 19:02 ` Mark Pearson
2026-09-06 13:10 ` Ali Ahmet Memiş
2026-08-12 18:29 ` [PATCH 1/3] platform/x86: thinkpad_acpi: convert mutex_lock() to guard(mutex) Mark Pearson
2026-08-12 19:55 ` [ibm-acpi-devel] " Mark Pearson
2026-09-06 13:10 ` Ali Ahmet Memiş
2026-09-15 11:33 ` Ilpo Järvinen
2026-09-30 5:06 ` Dmitry Torokhov [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=aryYOI92NRUGT-4F@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=nitjoshi@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
/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®