[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.