Re: [PATCH 1/3] serial: core: introduce guard(uart_port_lock_sysrq_irqsave)

From: Ilpo Järvinen

Date: Wed May 13 2026 - 08:30:03 EST


On Wed, 13 May 2026, Jacques Nilo wrote:

> On Wed, 13 May 2026, Ilpo Järvinen wrote:
>
> > > +DEFINE_LOCK_GUARD_1(uart_port_lock_sysrq_irqsave, struct uart_port,
> >
> > I suppose the "check" in the name is kind of important detail so maybe
> > it shouldn't be dropped from the guard name.
>
> Quick clarification before I respin: do you want this renamed in v2?
>
> I dropped the "check_" segment because the existing
> guard(uart_port_lock_irqsave) doesn't mirror its destructor's name
> either (it expands to uart_port_unlock_irqrestore, not
> uart_port_lock_irqsave_and_unlock_irqrestore), and the longer
> uart_port_lock_check_sysrq_irqsave starts to feel verbose. But I see
> the symmetry argument with uart_unlock_and_check_sysrq_irqrestore() and
> I have no strong attachment to the shorter name.

I meant guard(uart_port_lock_check_sysrq_irqsave)

The point is it does "check" sysrq. Though I admit I'm starting to see now
why you had irqsave earlier placed before sysrq.

It still fits to the expected indentation levels pretty well.

> If you'd like the rename, I'll do it for v2. If you're fine either
> way, I'll keep the current name -- patches 2/3 and 3/3 already have
> your Reviewed-by trailers on the call sites and I'd rather not
> invalidate those over a naming choice.
>
> The other points (commit-message reflow, Cc: stable on 1/3,
> single-line destructor formatting) are unambiguous and will land in
> v2 regardless.
>
> Thanks for the review.
>
> --
> Jacques
>

--
i.