public inbox for linux-sparse@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-sparse@vger.kernel.org
Cc: sparse@chrisli.org, Ben Dooks <ben.dooks@codethink.co.uk>,
	Paul Walmsley <pjw@kernel.org>
Subject: [PATCHv2 2/2] RISC-V: restart extension search on match
Date: Wed,  7 Jan 2026 21:30:11 +0000	[thread overview]
Message-ID: <20260107213011.204578-2-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20260107213011.204578-1-ben.dooks@codethink.co.uk>

If we are passed multiple extensions in -march, don't assume these will
be in any sort of order. If we do match, then restart the loop by setting
the search back to 0, and retrying.

This sorts out issues with the current kernel build where there are now
lots of extensions for the rv64i and even adding zacas doesn't silence the
warnings generated.

Tested-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
v2:
  - fixed accidental whitespace change.
---
 target-riscv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target-riscv.c b/target-riscv.c
index 80c25285..cd6104b2 100644
--- a/target-riscv.c
+++ b/target-riscv.c
@@ -80,6 +80,7 @@ ext:
 		if (!strncmp(arg, pat, len)) {
 			riscv_flags |= extensions[i].flags;
 			arg += len;
+			i = 0;
 		}
 	}
 	if (arg[0])
-- 
2.37.2.352.g3c44437643


      reply	other threads:[~2026-01-07 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 21:30 [PATCHv2 1/2] RISC-V: Stop warning about Zabha and Zacas Ben Dooks
2026-01-07 21:30 ` Ben Dooks [this message]

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=20260107213011.204578-2-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=linux-sparse@vger.kernel.org \
    --cc=pjw@kernel.org \
    --cc=sparse@chrisli.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