From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: Thomas Gleixner <tglx@kernel.org>,
linux-input@vger.kernel.org,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Cheng-Yang Chou <yphbchou0911@gmail.com>,
Frank Li <Frank.Li@nxp.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Jinjie Ruan <ruanjinjie@huawei.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
Marc Zyngier <maz@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 1/2] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ with valid IRQ check
Date: Thu, 12 Feb 2026 10:44:39 -0800 [thread overview]
Message-ID: <aY4fdWbsBAuoavgx@google.com> (raw)
In-Reply-To: <1a2db366-a611-4454-a86e-cf7df9cbc358@mailbox.org>
On Wed, Jan 28, 2026 at 03:33:03PM +0100, Marek Vasut wrote:
> On 1/28/26 2:49 PM, Thomas Gleixner wrote:
> > On Wed, Jan 28 2026 at 13:23, Marek Vasut wrote:
> > > On 1/27/26 10:14 AM, Thomas Gleixner wrote:
> > > > disable_valid_irq is a pretty non-intuitive name if you look at it just
> > > > by reading a usage site. It's not really improving the readability of
> > > > the code, it's in fact obscuring it as the reader has to actually look
> > > > up what the hell this means and then stumble upon a completely
> > > > undocumented lock guard define.
> > > >
> > > > I'm all for using guards, but using guards just for the sake of using
> > > > guards is not a really good approach.
> > > I wouldn't even be opposed to converting the ili2xxx driver (the piece
> > > of code in patch 2/2 of this series) back to simple enable/disable_irq()
> > > . I am not particularly on board even with the disable_irq lock guard,
> > > or more specifically, lock guard used for non-lock things like this.
> >
> > I agree that guard() is a slight misnomer for such usage, but this is
> > about scoped auto cleanups, so using it this way makes a lot of sense
> > when the scope mechanism is sensible.
> It is indeed a misnomer.
>
> Would you prefer this patch be updated with some better function name, or
> dropped outright until there are surely more users of this functionality ?
Maybe call it "disable_irq_if_valid"?
Thanks.
--
Dmitry
prev parent reply other threads:[~2026-02-12 18:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 23:23 [PATCH 1/2] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ with valid IRQ check Marek Vasut
2026-01-21 23:23 ` [PATCH 2/2] Input: ili210x - convert to disable_valid_irq scoped guard Marek Vasut
2026-01-22 15:38 ` [PATCH 1/2] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ with valid IRQ check Frank Li
2026-01-22 19:11 ` Marek Vasut
2026-01-22 16:22 ` Sebastian Andrzej Siewior
2026-01-22 16:31 ` Geert Uytterhoeven
2026-01-22 18:38 ` Dmitry Torokhov
2026-01-22 18:57 ` Sergey Shtylyov
2026-01-23 10:52 ` Thomas Gleixner
2026-01-25 5:30 ` Dmitry Torokhov
2026-01-27 9:14 ` Thomas Gleixner
2026-01-28 12:23 ` Marek Vasut
2026-01-28 13:49 ` Thomas Gleixner
2026-01-28 14:33 ` Marek Vasut
2026-02-12 18:44 ` 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=aY4fdWbsBAuoavgx@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=Frank.Li@nxp.com \
--cc=bigeasy@linutronix.de \
--cc=geert+renesas@glider.be \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut@mailbox.org \
--cc=maz@kernel.org \
--cc=peterz@infradead.org \
--cc=ruanjinjie@huawei.com \
--cc=tglx@kernel.org \
--cc=yphbchou0911@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