diff mbox series

[PATCH-for-9.1,1/8] target/microblaze: Use correct string format in do_unaligned_access()

Message ID 20240319062855.8025-2-philmd@linaro.org
State New
Headers show
Series target/microblaze: Sprint housekeeping | expand

Commit Message

Philippe Mathieu-Daudé March 19, 2024, 6:28 a.m. UTC
'addr' is of type 'vaddr'; no need to cast, use the
corresponding format string.

Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/microblaze/helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Anton Johansson March 19, 2024, 3:52 p.m. UTC | #1
On 19/03/24, Philippe Mathieu-Daudé wrote:
> 'addr' is of type 'vaddr'; no need to cast, use the
> corresponding format string.
> 
> Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/microblaze/helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
> index d25c9eb4d3..0a12c4ea94 100644
> --- a/target/microblaze/helper.c
> +++ b/target/microblaze/helper.c
> @@ -279,8 +279,8 @@ void mb_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
>      iflags = cpu->env.iflags;
>  
>      qemu_log_mask(CPU_LOG_INT,
> -                  "Unaligned access addr=" TARGET_FMT_lx " pc=%x iflags=%x\n",
> -                  (target_ulong)addr, cpu->env.pc, iflags);
> +                  "Unaligned access addr=0x%"VADDR_PRIx" pc=0x%x iflags=0x%x\n",
> +                  addr, cpu->env.pc, iflags);
>  
>      esr = ESR_EC_UNALIGNED_DATA;
>      if (likely(iflags & ESR_ESS_FLAG)) {
> -- 
> 2.41.0
> 
Reviewed-by: Anton Johansson <anjo@rev.ng>
Edgar E. Iglesias March 19, 2024, 4:29 p.m. UTC | #2
On Tue, Mar 19, 2024 at 07:28:48AM +0100, Philippe Mathieu-Daudé wrote:
> 'addr' is of type 'vaddr'; no need to cast, use the
> corresponding format string.
> 
> Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>


> ---
>  target/microblaze/helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
> index d25c9eb4d3..0a12c4ea94 100644
> --- a/target/microblaze/helper.c
> +++ b/target/microblaze/helper.c
> @@ -279,8 +279,8 @@ void mb_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
>      iflags = cpu->env.iflags;
>  
>      qemu_log_mask(CPU_LOG_INT,
> -                  "Unaligned access addr=" TARGET_FMT_lx " pc=%x iflags=%x\n",
> -                  (target_ulong)addr, cpu->env.pc, iflags);
> +                  "Unaligned access addr=0x%"VADDR_PRIx" pc=0x%x iflags=0x%x\n",
> +                  addr, cpu->env.pc, iflags);
>  
>      esr = ESR_EC_UNALIGNED_DATA;
>      if (likely(iflags & ESR_ESS_FLAG)) {
> -- 
> 2.41.0
>
diff mbox series

Patch

diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
index d25c9eb4d3..0a12c4ea94 100644
--- a/target/microblaze/helper.c
+++ b/target/microblaze/helper.c
@@ -279,8 +279,8 @@  void mb_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
     iflags = cpu->env.iflags;
 
     qemu_log_mask(CPU_LOG_INT,
-                  "Unaligned access addr=" TARGET_FMT_lx " pc=%x iflags=%x\n",
-                  (target_ulong)addr, cpu->env.pc, iflags);
+                  "Unaligned access addr=0x%"VADDR_PRIx" pc=0x%x iflags=0x%x\n",
+                  addr, cpu->env.pc, iflags);
 
     esr = ESR_EC_UNALIGNED_DATA;
     if (likely(iflags & ESR_ESS_FLAG)) {