qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>,
	qemu-devel@nongnu.org, crosthwaitepeter@gmail.com,
	peter.maydell@linaro.org
Cc: Sai Pavan Boddu <saipava@xilinx.com>,
	edgari@xilinx.com, alistai@xilinx.com
Subject: Re: [Qemu-devel] [PATCH V2] sdhci: use PRIx64 for uint64_t type
Date: Sat, 5 Sep 2015 06:41:33 -0600	[thread overview]
Message-ID: <55EAE2FD.8060009@redhat.com> (raw)
In-Reply-To: <1441444376-4947-1-git-send-email-saipava@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]

On 09/05/2015 03:12 AM, Sai Pavan Boddu wrote:
> Fix compile time warnings, because of type mismatch for unsigned long
> long type.
> 
> Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
> ---
> Changes for V2:
>     Fix commit message.
>     Correct line lenght.
> ---

> +#include <inttypes.h>
>  #include "hw/hw.h"
>  #include "sysemu/block-backend.h"
>  #include "sysemu/blockdev.h"
> @@ -719,7 +720,8 @@ static void sdhci_do_adma(SDHCIState *s)
>              break;
>          case SDHC_ADMA_ATTR_ACT_LINK:   /* link to next descriptor table */
>              s->admasysaddr = dscr.addr;
> -            DPRINT_L1("ADMA link: admasysaddr=0x%lx\n", s->admasysaddr);
> +            DPRINT_L1("ADMA link: admasysaddr=0x%" PRIx64 "\n",
> +                      s->admasysaddr);

Please also fix the real problem. This sort of bitrot will keep
occurring unless DPRINT_L1() is fixed to unconditionally compile its
arguments.  In other words, do something like:

#define DPRINT_L1(fmt, ...) \
    do { \
        if (SDHC_DEBUG) { \
            fprintf(stderr, "QEMU SDHC: " fmt, ##__VA_ARGS__); \
        } \
    } while (0)
#define DPRINT_L2(fmt, ...) \
    do { \
        if (SDHC_DEBUG > 1) { \
            fprintf(stderr, "QEMU SDHC: " fmt, ##__VA_ARGS__); \
        } \
    } while (0)
#define ERRPRINT(fmt, ...) \
    do {
        if (SDHC_DEBUG) { \
            fprintf(stderr, "QEMU SDHC ERROR: " fmt, ##__VA_ARGS__); \
        } \
    } while (0)

rather than the current junk that eliminates the fprintf entirely when
SDHC_DEBUG is at its default of 0.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-09-05 12:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-05  9:12 [Qemu-devel] [PATCH V2] sdhci: use PRIx64 for uint64_t type Sai Pavan Boddu
2015-09-05 12:41 ` Eric Blake [this message]
2015-09-05 18:33   ` Peter Crosthwaite
2015-09-06 17:41   ` Sai Pavan Boddu
2015-09-05 18:32 ` Peter Crosthwaite
2015-09-06 17:43   ` Sai Pavan Boddu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55EAE2FD.8060009@redhat.com \
    --to=eblake@redhat.com \
    --cc=alistai@xilinx.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=edgari@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sai.pavan.boddu@xilinx.com \
    --cc=saipava@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).