qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH 09/11] target/sparc: fix DEBUG_MM


From: Eric Blake
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 09/11] target/sparc: fix DEBUG_MMU DPRINTF() arguments
Date: Mon, 8 May 2017 19:00:32 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 05/08/2017 06:39 PM, Philippe Mathieu-Daudé wrote:
> invalid since 96df2bc99f9
> 
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  target/sparc/ldst_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
> index 57968d9143..aa83a49a88 100644
> --- a/target/sparc/ldst_helper.c
> +++ b/target/sparc/ldst_helper.c
> @@ -1631,7 +1631,7 @@ void helper_st_asi(CPUSPARCState *env, target_ulong 
> addr, target_ulong val,
>  
>              if (oldreg != env->immu.mmuregs[reg]) {
>                  DPRINTF_MMU("immu change reg[%d]: 0x%016" PRIx64 " -> 0x%016"
> -                            PRIx64 "\n", reg, oldreg, env->immuregs[reg]);
> +                            PRIx64 "\n", reg, oldreg, 
> env->immu.mmuregs[reg]);

Please take this opportunity to fix the broken definitions of
DPRINTF_MMU() and friends so that they don't bit-rot when not defined.
There are plenty of other examples of re-writing broken #defines to
instead favor an if (0) { printf(...) } to benefit from -Wformat
checking even when the debugging is disabled.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]