* [PATCH] cmd: sbi: Correctly display unknown implementation IDs
@ 2024-03-06 14:44 Heinrich Schuchardt
2024-03-06 15:22 ` Conor Dooley
2024-03-07 11:36 ` Dan Carpenter
0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2024-03-06 14:44 UTC (permalink / raw)
To: Rick Chen, Leo; +Cc: u-boot, Heinrich Schuchardt
For an unknown implementation ID an output like
SBI 1.0Unknown implementation ID 16777216
Extensions:
sbi_set_timer
...
was shown. The number 16777216 is not the implementation ID.
* Show the correct number
* Use a hexadecimal output format
* Add a missing line feed
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
cmd/riscv/sbi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
index 9daf0e247ad..87f7966f06b 100644
--- a/cmd/riscv/sbi.c
+++ b/cmd/riscv/sbi.c
@@ -99,7 +99,7 @@ static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
}
}
if (i == ARRAY_SIZE(implementations))
- printf("Unknown implementation ID %ld", ret);
+ printf("\nUnknown implementation ID 0x%x", impl_id);
}
printf("\nMachine:\n");
ret = sbi_get_mvendorid(&mvendorid);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cmd: sbi: Correctly display unknown implementation IDs
2024-03-06 14:44 [PATCH] cmd: sbi: Correctly display unknown implementation IDs Heinrich Schuchardt
@ 2024-03-06 15:22 ` Conor Dooley
2024-03-07 11:36 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2024-03-06 15:22 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Rick Chen, Leo, u-boot
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
On Wed, Mar 06, 2024 at 03:44:02PM +0100, Heinrich Schuchardt wrote:
> For an unknown implementation ID an output like
>
> SBI 1.0Unknown implementation ID 16777216
> Extensions:
> sbi_set_timer
> ...
>
> was shown. The number 16777216 is not the implementation ID.
>
> * Show the correct number
> * Use a hexadecimal output format
> * Add a missing line feed
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
> cmd/riscv/sbi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
> index 9daf0e247ad..87f7966f06b 100644
> --- a/cmd/riscv/sbi.c
> +++ b/cmd/riscv/sbi.c
> @@ -99,7 +99,7 @@ static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
> }
> }
> if (i == ARRAY_SIZE(implementations))
> - printf("Unknown implementation ID %ld", ret);
> + printf("\nUnknown implementation ID 0x%x", impl_id);
> }
> printf("\nMachine:\n");
> ret = sbi_get_mvendorid(&mvendorid);
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cmd: sbi: Correctly display unknown implementation IDs
2024-03-06 14:44 [PATCH] cmd: sbi: Correctly display unknown implementation IDs Heinrich Schuchardt
2024-03-06 15:22 ` Conor Dooley
@ 2024-03-07 11:36 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-03-07 11:36 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Rick Chen, Leo, u-boot
On Wed, Mar 06, 2024 at 03:44:02PM +0100, Heinrich Schuchardt wrote:
> For an unknown implementation ID an output like
>
> SBI 1.0Unknown implementation ID 16777216
> Extensions:
> sbi_set_timer
> ...
>
> was shown. The number 16777216 is not the implementation ID.
>
> * Show the correct number
> * Use a hexadecimal output format
> * Add a missing line feed
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 89a86dcf6191 ("cmd: sbi: show SBI implementation version")
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-07 11:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06 14:44 [PATCH] cmd: sbi: Correctly display unknown implementation IDs Heinrich Schuchardt
2024-03-06 15:22 ` Conor Dooley
2024-03-07 11:36 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).