From: Jisheng Zhang <jszhang@kernel.org>
To: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Cc: 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>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: unaligned: fix __setup handlers
Date: Thu, 12 Nov 2026 12:22:03 +0800 [thread overview]
Message-ID: <avU-62EVrL341rL5@xhacker> (raw)
In-Reply-To: <20261111-fix-riscv-unaligned-v1-1-0722514fc1e4@mobileye.com>
On Wed, Nov 11, 2026 at 12:41:21PM +0200, Vladimir Kondratiev wrote:
> 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>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> 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>
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang@kernel.org>
To: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Cc: 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>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: unaligned: fix __setup handlers
Date: Thu, 12 Nov 2026 12:22:03 +0800 [thread overview]
Message-ID: <avU-62EVrL341rL5@xhacker> (raw)
In-Reply-To: <20261111-fix-riscv-unaligned-v1-1-0722514fc1e4@mobileye.com>
On Wed, Nov 11, 2026 at 12:41:21PM +0200, Vladimir Kondratiev wrote:
> 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>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> 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>
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-11-12 4:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 10:41 [PATCH] riscv: unaligned: fix __setup handlers Vladimir Kondratiev
2026-11-11 10:41 ` Vladimir Kondratiev
2026-11-12 4:22 ` Jisheng Zhang [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=avU-62EVrL341rL5@xhacker \
--to=jszhang@kernel.org \
--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 \
--cc=vladimir.kondratiev@mobileye.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.