[PATCH v2 1/7] include: sbi: Make "s8" actually signed.

Anup Patel anup at brainfault.org
Mon Dec 15 07:46:25 PST 2025


On Sat, Nov 15, 2025 at 2:09 AM Benedikt Freisen <b.freisen at gmx.net> wrote:
>
> Since plain "char" is implicitly unsigned on RISC-V, "s8" should be an alias for "signed char".
>
> Signed-off-by: Benedikt Freisen <b.freisen at gmx.net>
> Reviewed-by: Radim Krčmář <rkrcmar at ventanamicro.com>

LGTM.

Reviewed-by: Anup Patel <anup at brainfault.org>

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

> ---
>  include/sbi/sbi_types.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h
> index 2637faf..b8a7e6c 100644
> --- a/include/sbi/sbi_types.h
> +++ b/include/sbi/sbi_types.h
> @@ -14,7 +14,7 @@
>
>  /* clang-format off */
>
> -typedef char                   s8;
> +typedef signed char            s8;
>  typedef unsigned char          u8;
>  typedef unsigned char          uint8_t;
>
> --
> 2.51.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list