diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-16 12:35:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:48 -0700 |
commit | a14bd58cd39b6af4d9af5827c5c70c4582c5b486 (patch) | |
tree | a81092d1d05a79fdf76b77133eacff0c48c052ef | |
parent | 28b6ca9c07787885b89972929f45084eb3197d98 (diff) | |
download | op-kernel-dev-a14bd58cd39b6af4d9af5827c5c70c4582c5b486.zip op-kernel-dev-a14bd58cd39b6af4d9af5827c5c70c4582c5b486.tar.gz |
Staging: hv: osd: remove LogMsg wrapper
Use the "real" printk call instead of a wrapper function.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/include/logging.h | 54 | ||||
-rw-r--r-- | drivers/staging/hv/include/osd.h | 2 | ||||
-rw-r--r-- | drivers/staging/hv/osd.c | 13 |
3 files changed, 31 insertions, 38 deletions
diff --git a/drivers/staging/hv/include/logging.h b/drivers/staging/hv/include/logging.h index c36eaf8..54af17a 100644 --- a/drivers/staging/hv/include/logging.h +++ b/drivers/staging/hv/include/logging.h @@ -53,11 +53,10 @@ BLKVSC_DRV) // Logging Level -#define CRITICAL_LVL 2 -#define ERROR_LVL 3 -#define WARNING_LVL 4 -#define INFO_LVL 6 -#define DEBUG_LVL 7 +#define ERROR_LVL 3 +#define WARNING_LVL 4 +#define INFO_LVL 6 +#define DEBUG_LVL 7 #define DEBUG_LVL_ENTEREXIT 8 #define DEBUG_RING_LVL 9 @@ -65,44 +64,53 @@ extern unsigned int vmbus_loglevel; #define ASSERT(expr) \ if (!(expr)) { \ - LogMsg("<%d>Assertion failed! %s,%s,%s,line=%d\n", CRITICAL_LVL, #expr,__FILE__,__FUNCTION__,__LINE__); \ + printk(KERN_CRIT "Assertion failed! %s,%s,%s,line=%d\n", \ + #expr, __FILE__, __func__, __LINE__); \ __asm__ __volatile__("int3"); \ } #define DPRINT(mod, lvl, fmt, args...) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (lvl <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": %s() " fmt "\n", DEBUG_LVL, __FUNCTION__, ## args)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (lvl <= LOWORD(vmbus_loglevel))) \ + printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\ } while (0) #define DPRINT_DBG(mod, fmt, args...) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (DEBUG_LVL <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": %s() " fmt "\n", DEBUG_LVL, __FUNCTION__, ## args)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (DEBUG_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\ } while (0) #define DPRINT_INFO(mod, fmt, args...) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (INFO_LVL <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": " fmt "\n", INFO_LVL, ## args)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (INFO_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_INFO #mod": " fmt "\n", ## args);\ } while (0) #define DPRINT_WARN(mod, fmt, args...) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (WARNING_LVL <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": WARNING! " fmt "\n", WARNING_LVL, ## args)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (WARNING_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\ } while (0) #define DPRINT_ERR(mod, fmt, args...) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (ERROR_LVL <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" #mod": %s() ERROR!! " fmt "\n", ERROR_LVL, __FUNCTION__, ## args)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (ERROR_LVL <= LOWORD(vmbus_loglevel))) \ + printk(KERN_ERR #mod": %s() ERROR!! " fmt "\n", \ + __func__, ## args);\ } while (0) #ifdef DEBUG #define DPRINT_ENTER(mod) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" "["#mod"]: %s() enter\n", DEBUG_LVL, __FUNCTION__)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))) \ + printk(KERN_DEBUG "["#mod"]: %s() enter\n", __func__);\ } while (0) #define DPRINT_EXIT(mod) do {\ - if (mod & (HIWORD(vmbus_loglevel))) \ - (DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))?(LogMsg("<%d>" "["#mod"]: %s() exit\n", DEBUG_LVL, __FUNCTION__)):(0);\ + if ((mod & (HIWORD(vmbus_loglevel))) && \ + (DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))) \ + printk(KERN_DEBUG "["#mod"]: %s() exit\n", __func__);\ } while (0) #else #define DPRINT_ENTER(mod) @@ -113,12 +121,12 @@ static inline void PrintBytes(const unsigned char* bytes, int len) { int i=0; - LogMsg("\n<< "); + printk("\n<< "); for (i=0; i< len; i++) { - LogMsg("0x%x ", bytes[i]); + printk("0x%x ", bytes[i]); } - LogMsg(">>\n"); + printk(">>\n"); } // diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h index 467196d..2d5cd4d 100644 --- a/drivers/staging/hv/include/osd.h +++ b/drivers/staging/hv/include/osd.h @@ -98,8 +98,6 @@ static inline void do_cpuid(unsigned int op, unsigned int *eax, unsigned int *eb // // Osd routines // -extern void LogMsg(const char *fmt, ...); - extern void BitSet(unsigned int* addr, int value); extern void BitClear(unsigned int* addr, int value); extern int BitTest(unsigned int* addr, int value); diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 7a4c438..42da804 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -72,19 +72,6 @@ typedef struct _WORKITEM { } WORKITEM; -// -// Global -// - -void LogMsg(const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - vprintk(fmt, args); - va_end(args); -} - void BitSet(unsigned int* addr, int bit) { set_bit(bit, (unsigned long*)addr); |