lkml.org 
[lkml]   [2002]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: __FUNCTION__
Ian S. Nelson wrote:

> I suspect this might be about as religious an issue as there is but
> has anyone thought about coming up with some "standard" debugging
> macros, perhaps something that can be configured at compile time from
> the configuration for everyone to use everywhere? I've got my own
> debug macros, essentially a printk with the file, function and line
> added wrapped in #ifdef DEBUG. I've seen several other schemes in
> other parts of the kernel and now some of them aren't correct.
>
> I guess what I would envision is some kind of debug menu item in the
> configuration tool that let's you select if you want messages, and/or
> filenames, and/or line numbers, and/or function names, or nothing at
> all. They could still be controlled at the module level by defining
> or not defining some constant. It just seems kind of pointless to
> have 10-20 different macros or methods that all do the same thing for
> different parts of the kernel.
> Ian
>
I am fully agree with idea of one set of debug/info/warn/etc. macros.
My main point in prev. posting was to fix __FUNCTION__, for USB this
seems to be easy doable since there is already subsystem-wide dbg() and
alike macros. Actually, there is no sense for __FUNCTION__ to appear
outside macros; in real code it provides no added value (except easy
cut-n-paste from function to function).



-
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/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.117 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site