Commit a14bd58c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 28b6ca9c
......@@ -53,7 +53,6 @@
BLKVSC_DRV)
// Logging Level
#define CRITICAL_LVL 2
#define ERROR_LVL 3
#define WARNING_LVL 4
#define INFO_LVL 6
......@@ -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");
}
//
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment