lib: sbi: Fix printf handling of long long
authordramforever <dramforever@live.com>
Wed, 27 Jul 2022 16:30:05 +0000 (00:30 +0800)
committerAnup Patel <anup@brainfault.org>
Sat, 30 Jul 2022 06:25:51 +0000 (11:55 +0530)
commitb9edf49b67a1b5e47b1c35dcd7c75efccaf22ea3
treecc9cec44efc70acdbbe945e3502a8f1da2fb2a52
parentf27203525aa2fc20d0074feb892a6f8433f84e3a
lib: sbi: Fix printf handling of long long

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@live.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_console.c