[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH V3 2/2] sdhci: Change debug prints to compile
From: |
Sai Pavan Boddu |
Subject: |
Re: [Qemu-trivial] [PATCH V3 2/2] sdhci: Change debug prints to compile unconditionally |
Date: |
Mon, 7 Sep 2015 18:09:50 +0000 |
> -----Original Message-----
> From: Peter Crosthwaite [mailto:address@hidden
> Sent: Monday, September 07, 2015 10:52 PM
> To: Sai Pavan Boddu; address@hidden
> Cc: address@hidden Developers; Eric Blake; Peter Maydell; Alistair
> Francis; Edgar Iglesias; Sai Pavan Boddu
> Subject: Re: [PATCH V3 2/2] sdhci: Change debug prints to compile
> unconditionally
>
> On Sun, Sep 6, 2015 at 11:45 PM, Sai Pavan Boddu
> <address@hidden> wrote:
> > Conditionaly compilation hides few type mismatch warnings, fix it to
>
> "conditional"
>
> > compile unconditioinal.
> >
>
> "unconditionally"
>
> > Signed-off-by: Sai Pavan Boddu <address@hidden>
> > Suggested-by: Eric Blake <address@hidden>
>
> Otherwise:
>
> Reviewed-by: Peter Crosthwaite <address@hidden>
Thanks! , Send V4 correcting the commit.
Regards,
Sai Pavan
>
> Can trivial take these two?
>
> Regards,
> Peter
>
> > ---
> > hw/sd/sdhci.c | 36 ++++++++++++++++++------------------
> > 1 file changed, 18 insertions(+), 18 deletions(-)
> >
> > diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
> > index 639feee..3ad6c76 100644
> > --- a/hw/sd/sdhci.c
> > +++ b/hw/sd/sdhci.c
> > @@ -37,24 +37,24 @@
> > #define SDHC_DEBUG 0
> > #endif
> >
> > -#if SDHC_DEBUG == 0
> > - #define DPRINT_L1(fmt, args...) do { } while (0)
> > - #define DPRINT_L2(fmt, args...) do { } while (0)
> > - #define ERRPRINT(fmt, args...) do { } while (0)
> > -#elif SDHC_DEBUG == 1
> > - #define DPRINT_L1(fmt, args...) \
> > - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0)
> > - #define DPRINT_L2(fmt, args...) do { } while (0)
> > - #define ERRPRINT(fmt, args...) \
> > - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0)
> > -#else
> > - #define DPRINT_L1(fmt, args...) \
> > - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0)
> > - #define DPRINT_L2(fmt, args...) \
> > - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0)
> > - #define ERRPRINT(fmt, args...) \
> > - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0)
> > -#endif
> > +#define DPRINT_L1(fmt, args...) \
> > + do { \
> > + if (SDHC_DEBUG) { \
> > + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \
> > + } \
> > + } while (0)
> > +#define DPRINT_L2(fmt, args...) \
> > + do { \
> > + if (SDHC_DEBUG > 1) { \
> > + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \
> > + } \
> > + } while (0)
> > +#define ERRPRINT(fmt, args...) \
> > + do { \
> > + if (SDHC_DEBUG) { \
> > + fprintf(stderr, "QEMU SDHC ERROR: " fmt, ## args); \
> > + } \
> > + } while (0)
> >
> > /* Default SD/MMC host controller features information, which will be
> > * presented in CAPABILITIES register of generic SD host controller at
> > reset.
> > --
> > 1.9.1
> >