[PATCH] firmware: arm_scmi: Support loop control in quirk code snippets

Geert Uytterhoeven geert at linux-m68k.org
Mon Mar 16 09:01:56 PDT 2026


Hi Christian,

On Mon, 16 Mar 2026 at 16:55, Cristian Marussi <cristian.marussi at arm.com> wrote:
> On Mon, Mar 16, 2026 at 04:34:40PM +0100, Geert Uytterhoeven wrote:
> > Each SCMI firmware quirk contains a code snippet, which handles the
> > quirk, and has full access to the surrounding context.  When this
> > context is (part of) a loop body, the code snippet may want to use loop
> > control statements like "break" and "continue".  Unfortunately the
> > SCMI_QUIRK() macro implementation contains a dummy loop, taking
> > precedence over any outer loops.  Hence quirk code cannot use loop
> > control statements, but has to resort to polluting the surrounding
> > context with a label, and use goto.
>
> I was just now writing the quirk for the Renesas issue and realized
> this limitation :P
>
> Do you want me to pick this up with the quirk template for Renesas issue
> that I am writing and post all in V3, or you have already the quirk too ?

I do have a preliminary quirk, but I don't think it is ready for
merging yet.  Getting this limitation relaxed is something that can
already move forward, though.

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