[PATCH 1/3] firmware: arm_scmi: quirk: Improve quirk range parsing

Geert Uytterhoeven geert at linux-m68k.org
Thu Apr 30 03:34:43 PDT 2026


Hi Sudeep,

On Thu, 30 Apr 2026 at 12:17, Sudeep Holla <sudeep.holla at kernel.org> wrote:
> On Fri, Apr 03, 2026 at 10:41:29AM +0200, Geert Uytterhoeven wrote:
> > When a range contains only an end ("-X"), the number string is parsed
> > twice, as both "sep == first" and "sep != last" are true.  Fix this by
> > dropping the superfluous number parsing for "sep == first".
> >
> > This does have a harmless functional impact for the unbounded range:
> > "-" is now accepted, while it was rejected before.
>
> Supporting "-" is good but I think the ret is uninitialised in that case
> as sep, first and last are all equal. If you agree, I can patch up by
> initialising ret to 0. Let me know if I am missing any other case where
> it is not good to have ret initialised to 0.

My bad, ret should indeed be preinitialized to zero.
Thanks for fixing!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-arm-kernel mailing list