From: Peng Fan <peng.fan@oss.nxp.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Sudeep Holla <sudeep.holla@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] firmware: arm_scmi: Support loop control in quirk code snippets
Date: Tue, 17 Mar 2026 15:25:30 +0800 [thread overview]
Message-ID: <abkB6tnWzxw1AdxH@shlinux89> (raw)
In-Reply-To: <51de914cddef8fa86c2e7dd5397e5df759c45464.1773675224.git.geert+renesas@glider.be>
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.
>
>Fix this by replacing the "do { ... } while (0)" construct in the
>SCMI_QUIRK() implementation by "({ ... })".
>
>Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
next prev parent reply other threads:[~2026-03-17 7:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 15:34 [PATCH] firmware: arm_scmi: Support loop control in quirk code snippets Geert Uytterhoeven
2026-03-16 15:55 ` Cristian Marussi
2026-03-16 16:01 ` Geert Uytterhoeven
2026-03-16 16:53 ` Cristian Marussi
2026-03-17 7:25 ` Peng Fan [this message]
2026-03-18 16:27 ` Sudeep Holla
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=abkB6tnWzxw1AdxH@shlinux89 \
--to=peng.fan@oss.nxp.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=geert+renesas@glider.be \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=sudeep.holla@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