diff mbox series

[1/2] cmd: smccc: Print results in hex instead of dec

Message ID 9a0278a7da729cb69b7a4d46c5e7eb8c3217c635.1676450712.git.michal.simek@amd.com
State Accepted
Commit e2aa078c1c682e535d31bb6227a17d5a50ad8a42
Delegated to: Michal Simek
Headers show
Series [1/2] cmd: smccc: Print results in hex instead of dec | expand

Commit Message

Michal Simek Feb. 15, 2023, 8:45 a.m. UTC
Printing return value in HEX instead of DEC. Return values are 64 bit
values which impossible to decode in DEC. For example getting CHIP ID in
dec is quite long.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

 cmd/smccc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Simek Feb. 27, 2023, 8:11 a.m. UTC | #1
On 2/15/23 09:45, Michal Simek wrote:
> Printing return value in HEX instead of DEC. Return values are 64 bit
> values which impossible to decode in DEC. For example getting CHIP ID in
> dec is quite long.
> 
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
> 
>   cmd/smccc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/smccc.c b/cmd/smccc.c
> index 0539a42587e2..fb80431ad1d9 100644
> --- a/cmd/smccc.c
> +++ b/cmd/smccc.c
> @@ -43,7 +43,7 @@ static int do_call(struct cmd_tbl *cmdtp, int flag, int argc,
>   	else
>   		arm_smccc_hvc(fid, a1, a2, a3, a4, a5, a6, a7, &res);
>   
> -	printf("Res:  %ld %ld %ld %ld\n", res.a0, res.a1, res.a2, res.a3);
> +	printf("Res:  0x%lx 0x%lx 0x%lx 0x%lx\n", res.a0, res.a1, res.a2, res.a3);
>   
>   	return 0;
>   }

Applied.
M
diff mbox series

Patch

diff --git a/cmd/smccc.c b/cmd/smccc.c
index 0539a42587e2..fb80431ad1d9 100644
--- a/cmd/smccc.c
+++ b/cmd/smccc.c
@@ -43,7 +43,7 @@  static int do_call(struct cmd_tbl *cmdtp, int flag, int argc,
 	else
 		arm_smccc_hvc(fid, a1, a2, a3, a4, a5, a6, a7, &res);
 
-	printf("Res:  %ld %ld %ld %ld\n", res.a0, res.a1, res.a2, res.a3);
+	printf("Res:  0x%lx 0x%lx 0x%lx 0x%lx\n", res.a0, res.a1, res.a2, res.a3);
 
 	return 0;
 }