On Tue, 13 May 2014 09:02:52 +0200 Marc Marí <marc.mari.barc...@gmail.com> wrote:
> Modify debug macros to have the same format through the codebase and use > regular > ifs instead of ifdef. > > As the debug printf is always put in code, some casting had to be added to > avoid > warnings treated as errors at compile time. > > Signed-off-by: Marc Marí <marc.mari.barc...@gmail.com> > --- > include/qemu-common.h | 7 +++++++ > migration-rdma.c | 32 ++++++++++++++------------------ > page_cache.c | 10 ++++++---- > 3 files changed, 27 insertions(+), 22 deletions(-) > > diff --git a/include/qemu-common.h b/include/qemu-common.h > index 3f3fd60..3593bdc 100644 > --- a/include/qemu-common.h > +++ b/include/qemu-common.h > @@ -463,3 +463,10 @@ int parse_debug_env(const char *name, int max, int > initial); > const char *qemu_ether_ntoa(const MACAddr *mac); > > #endif > + > +#define QEMU_DPRINTF(cond,pfx,fmt,...) \ > + do { \ > + if (cond) { \ > + fprintf(stderr, pfx": %s:"fmt, __func__, ## __VA_ARGS__); \ > + } \ > + } while (0) I'd split that hunk into a seperate patch and make it the first one in the series. That way, you'd preserve bisectability.