From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH][1/17] USB virt 2.6 split driver---xenidc platform Date: Mon, 21 Nov 2005 18:10:09 -0600 Message-ID: <438261E1.2010205@us.ibm.com> References: <1132579119.31295.112.camel@localhost.localdomain> <20051121201049.GA22728@granada.merseine.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20051121201049.GA22728@granada.merseine.nu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Muli Ben-Yehuda Cc: harry , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Muli Ben-Yehuda wrote: >I'm going to give every comment once, not everywhere it >happens. Please apply as appropriate to all recurring >occurences. Also, this is my personal opinion of what Linux code >should like like, please feel free to disagree, provided the >alternative is just as "Linuxy". > >On Mon, Nov 21, 2005 at 01:18:39PM +0000, harry wrote: > > >>+#define trace0( format ) \ >>+printk( KERN_INFO "xenidc %s:" format "\n", __PRETTY_FUNCTION__ ) >>+ >>+#define trace1( format, a0 ) \ >>+printk( KERN_INFO "xenidc %s:" format "\n", __PRETTY_FUNCTION__, a0 ) >>+ >>+#define trace2( format, a0, a1 ) \ >>+printk( KERN_INFO "xenidc %s:" format "\n", __PRETTY_FUNCTION__, a0, a1 ) >>+ >>+#define trace3( format, a0, a1, a2 ) \ >>+printk( KERN_INFO "xenidc %s:" format "\n", __PRETTY_FUNCTION__, a0, a1, a2 ) >>+ >>+#define trace() trace0( "" ) >> >> > >gcc has variable argument support in macros, please use it. > > Please use the C99 version instead of the GCC version. That would be: #define trace(format, ...) printk(KERN_INFO "xenidc %s: " format "\n", __FUNCTION__, ## __VA_ARGS__) The '##' is technically a GCC extension but the old style is deprecated anyway :-) Regards, Anthony Liguori