diff options
author | Alan Cox <alan@linux.intel.com> | 2009-08-06 20:45:47 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:12 -0700 |
commit | 46eb5a13b7f397b37bac14fbfa240cffa463783c (patch) | |
tree | 098f86e1e2206e2427ae4737fb019362f1068b48 /drivers/staging/sep/sep_driver_config.h | |
parent | 794f1d789520d423ef6d90d5390edea5c1b687c2 (diff) | |
download | op-kernel-dev-46eb5a13b7f397b37bac14fbfa240cffa463783c.zip op-kernel-dev-46eb5a13b7f397b37bac14fbfa240cffa463783c.tar.gz |
Staging: sep: do something about all the printk macros
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sep/sep_driver_config.h')
-rw-r--r-- | drivers/staging/sep/sep_driver_config.h | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/drivers/staging/sep/sep_driver_config.h b/drivers/staging/sep/sep_driver_config.h index 8a4d27a..f6d7ab6 100644 --- a/drivers/staging/sep/sep_driver_config.h +++ b/drivers/staging/sep/sep_driver_config.h @@ -199,50 +199,26 @@ /* the token that defines the start of time address */ #define SEP_TIME_VAL_TOKEN 0x12345678 + /* DEBUG LEVEL MASKS */ #define SEP_DEBUG_LEVEL_BASIC 0x1 -#define SEP_DEBUG_LEVEL_REGISTERS 0x2 - #define SEP_DEBUG_LEVEL_EXTENDED 0x4 -/* FUNCTIONAL MACROS */ +/* Debug helpers */ -/* debug macro without paramaters */ -#define DEBUG_PRINT_0(DEBUG_LEVEL , info) \ -do { \ - if (DEBUG_LEVEL & sepDebug) \ - printk(KERN_WARNING info); \ -} while (0) - -/* debug macro with 1 paramater */ -#define DEBUG_PRINT_1(DEBUG_LEVEL , info , param1) \ -do { \ - if (DEBUG_LEVEL & sepDebug) \ - printk(KERN_WARNING info, param1); \ -} while (0) - -/* debug macro with 2 paramaters */ -#define DEBUG_PRINT_2(DEBUG_LEVEL, info, param1, param2) \ -do { \ - if (DEBUG_LEVEL & sepDebug) \ - printk(KERN_WARNING info , param1, param2); \ -} while (0) - -/* debug macro with 3 paramaters */ -#define DEBUG_PRINT_3(DEBUG_LEVEL, info, param1, param2, param3) \ -do { \ - if (DEBUG_LEVEL & sepDebug) \ - printk(KERN_WARNING info , param1, param2 , param3); \ -} while (0) +#define dbg(fmt, args...) \ +do {\ + if (sepDebug & SEP_DEBUG_LEVEL_BASIC) \ + printk(KERN_DEBUG fmt, ##args); \ +} while(0); -/* debug macro with 4 paramaters */ -#define DEBUG_PRINT_4(DEBUG_LEVEL, info, param1, param2, param3, param4) \ +#define edbg(fmt, args...) \ do { \ - if (DEBUG_LEVEL & sepDebug) \ - printk(KERN_WARNING info, param1, param2, param3, param4); \ -} while (0) + if (sepDebug & SEP_DEBUG_LEVEL_EXTENDED) \ + printk(KERN_DEBUG fmt, ##args); \ +} while(0); |