2.5.34: IR __FUNCTION__ breakage

From: Bob_Tracy (rct@gherkin.frus.com)
Date: Thu Sep 12 2002 - 14:54:01 EST


I've been painstakingly going through all the IR code and fixing up
the __FUNCTION__ breakage. One of the not obvious patches is for
linux/net/irda/irnet/irnet.h, where string concatenation was fully
taken advantage of :-).

The problem lies in statements such as

#define DERROR(dbg, args...) \
        {if(DEBUG_##dbg) \
                printk(KERN_INFO "irnet: " __FUNCTION__ "(): " args);}

where you really want to avoid having any format strings because
"args" could legally have one (and probably will). Under the
circumstances, one option might be something like

define DERROR(dbg, args...) \
        {if(DEBUG_##dbg){\
                printk(KERN_INFO "irnet: %s(): ", __FUNCTION__);\
                printk(KERN_INFO args);}}

which strikes me as not quite what the author intended, although it
should work. Better ideas are welcome, and if a consensus is reached,
I'll be happy to submit the full IR __FUNCTION__ patch set against
2.5.34 for inclusion in a later kernel version.

-- 
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
rct@frus.com
-----------------------------------------------------------------------
-
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 : Sun Sep 15 2002 - 22:00:30 EST