From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WE31a-00043Z-OQ for kexec@lists.infradead.org; Thu, 13 Feb 2014 20:37:52 +0000 Date: Thu, 13 Feb 2014 15:35:05 -0500 From: Vivek Goyal Subject: Re: [PATCH 1/4] add macro dbgprint_mem_range Message-ID: <20140213203505.GK30844@redhat.com> References: <1392297055-31934-1-git-send-email-chaowang@redhat.com> <1392297055-31934-2-git-send-email-chaowang@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1392297055-31934-2-git-send-email-chaowang@redhat.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: WANG Chao Cc: kexec@lists.infradead.org, horms@verge.net.au, ebiederm@xmission.com, hpa@zytor.com, dyoung@redhat.com, trenn@suse.de 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? Vivek _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec