WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][1/17] USB virt 2.6 split driver---xenidc platfor

To: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][1/17] USB virt 2.6 split driver---xenidc platform
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Mon, 21 Nov 2005 18:10:09 -0600
Cc: harry <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 22 Nov 2005 00:10:18 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051121201049.GA22728@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1132579119.31295.112.camel@xxxxxxxxxxxxxxxxxxxxx> <20051121201049.GA22728@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel