[PATCH 1/4] add macro dbgprint_mem_range

WANG Chao chaowang at redhat.com
Fri Feb 14 01:31:58 EST 2014


On 02/13/14 at 03:35pm, Vivek Goyal wrote:
> On Thu, Feb 13, 2014 at 09:10:52PM +0800, WANG Chao wrote:
> 
> [..]
> > diff --git a/kexec/kexec.h b/kexec/kexec.h
> > index 2bd6e96..753acc5 100644
> > --- a/kexec/kexec.h
> > +++ b/kexec/kexec.h
> > @@ -121,6 +121,16 @@ do { \
> >  		fprintf(stderr, __VA_ARGS__); \
> >  } while(0)
> >  
> > +#define dbgprint_mem_range(prefix, mr, nr_mr) \
> > +do { \
> > +	int i; \
> > +	dbgprintf(prefix "\n"); \
> > +	for (i = 0; i < nr_mr; i++) { \
> > +		dbgprintf("%016llx-%016llx (%d)\n", (mr)[i].start, \
> > +			  (mr)[i].end, (mr)[i].type);                \
> > +	} \
> > +} while (0)
> > +
> 
> Can we make it a function instead of macro? 

Sure. Will put it in kexec.c

Thanks
WANG Chao



More information about the kexec mailing list