Ok, so what do you think of a include/linux/debug.h
and a CONFIG_DEBUG_MESSAGES
and in debug.h:
#ifdef CONFIG_DEBUG_MESSAGES
#define dprintk printk(KERN_DEBUG.....) /* find the best of the 1001 variants
already in the tree */
#else
#define dprintk(.....)
#endif
and in drivers currently using dprintk (and in others that want to start using
it instead of homebrew equivalent macros):
#include <linux/debug.h>
...happily use dprintk...
and the default kernel config would just disable (or other sane default agreed
here) so, assuming it is disabled it'd be easy to enable it on a per source
code file, doing this:
#include <other_includes>
#define CONFIG_DEBUG_MESSAGES
#include <linux/debug.h>
Would this be acceptable? Ah, all of the above is quickly hacked pseudocode 8)
- Arnaldo
-
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/