From: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
To: Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Andrew Jones <ajones@ventanamicro.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Subject: [PATCH] riscv: unaligned: fix __setup handlers
Date: Wed, 11 Nov 2026 12:41:21 +0200 [thread overview]
Message-ID: <20261111-fix-riscv-unaligned-v1-1-0722514fc1e4@mobileye.com> (raw)
Returning -EINVAL from a __setup() callback cause invalid
unaligned_scalar_speed= and unaligned_vector_speed=
values to be treated as handled. obsolete_checksetup() treats any
non-zero return value from setup_func() as success, so an unrecognized
argument is silently accepted instead of being reported as an unknown
boot option.
__setup() handlers return 0 on failure.
Fixes: aecb09e091dc ("riscv: Add parameter for skipping access speed tests")
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
---
arch/riscv/kernel/unaligned_access_speed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/kernel/unaligned_access_speed.c
index 67f1a0371659..323ccfcfbbb7 100644
--- a/arch/riscv/kernel/unaligned_access_speed.c
+++ b/arch/riscv/kernel/unaligned_access_speed.c
@@ -322,7 +322,7 @@ static int __init set_unaligned_scalar_speed_param(char *str)
else if (!strcmp(str, speed_str[RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED]))
unaligned_scalar_speed_param = RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED;
else
- return -EINVAL;
+ return 0;
return 1;
}
@@ -337,7 +337,7 @@ static int __init set_unaligned_vector_speed_param(char *str)
else if (!strcmp(str, speed_str[RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED]))
unaligned_vector_speed_param = RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED;
else
- return -EINVAL;
+ return 0;
return 1;
}
---
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
change-id: 20261111-fix-riscv-unaligned-e2df80509e0f
Best regards,
--
Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
next reply other threads:[~2026-11-11 10:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 10:41 Vladimir Kondratiev [this message]
2026-11-12 4:22 ` Jisheng Zhang
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=20261111-fix-riscv-unaligned-v1-1-0722514fc1e4@mobileye.com \
--to=vladimir.kondratiev@mobileye.com \
--cc=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@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
all inboxes | Powered by JetHome®