[PATCH v3] lib: sbi: Fix printf handling of long long
Andrew Jones
ajones at ventanamicro.com
Wed Jul 27 09:44:01 PDT 2022
On Thu, Jul 28, 2022 at 12:30:05AM +0800, dramforever wrote:
> Read long long arguments directly using va_arg. Remove original hack for
> RV32 that read a long long arg as two long args.
>
> This un-breaks the case on RV64 where e.g. the long long is followed by
> an odd number of ints:
>
> sbi_printf("%d %lld", (int) 1, (long long) 2LL);
>
> Also remove the acnt variable, which is now unused.
>
> Signed-off-by: dramforever <dramforever at live.com>
> ---
>
> Changes since v2:
>
> - Remove the acnt variable
>
> Changes since v1:
>
> - Removed hack that reads a long long as two longs
> - Better commit message
>
> lib/sbi/sbi_console.c | 30 ++----------------------------
> 1 file changed, 2 insertions(+), 28 deletions(-)
>
Reviewed-by: Andrew Jones <ajones at ventanamicro.com>
More information about the opensbi
mailing list