Re: __FUNCTION__ - patch for USB

From: Nick Craig-Wood (ncw@axis.demon.co.uk)
Date: Thu Jan 10 2002 - 04:08:27 EST


On Thu, Jan 10, 2002 at 12:12:29AM +0200, Vladimir Kondratiev wrote:
> Since I have started this thread, I feel I have to do something real.
> Dummy technical work, but someone have to do it, right?
> I patched USB subsystem, it uses __FUNCTION__ in deprecated way no more.

 #ifdef DEBUG
-#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg)
+#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ":%s - " format "\n", __FUNCTION__, ## arg)
 #else

I was going to suggest you use the C99 __func__ rather than
__FUNCTION__ but after a quick test it doesn't seem to be supported by
egcs-2.91.66 so I guess that is out for the time being? It is
supported by gcc-2.95 though.

-- 
Nick Craig-Wood
ncw@axis.demon.co.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:30 EST