firmware: arm_scmi: quirk: Simplify quirk table iteration

The current table entry is assigned in both the init and loop
expressions of the for-statement.  Merge this into a single assignment
in the conditional expression, to simplify the code.

While at it, make the loop counter unsigned and loop-local.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/8577f4b103cf04420c3b67dcaad528daff867287.1775205358.git.geert+renesas@glider.be
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
This commit is contained in:
Geert Uytterhoeven 2026-04-03 10:41:30 +02:00 committed by Sudeep Holla
parent 6991e5de97
commit 5be6732f82

View File

@ -258,10 +258,8 @@ static int scmi_quirk_range_parse(struct scmi_quirk *quirk)
void scmi_quirks_initialize(void)
{
struct scmi_quirk *quirk;
int i;
for (i = 0, quirk = scmi_quirks_table[0]; quirk;
i++, quirk = scmi_quirks_table[i]) {
for (unsigned int i = 0; (quirk = scmi_quirks_table[i]); i++) {
int ret;
ret = scmi_quirk_range_parse(quirk);