net: Add inet_addr lookup by table
[linux-2.6/btrfs-unstable.git] / drivers / staging / wilc1000 / wilc_log.h
blob2269ebdec129ca64cd4ce62e95e86ed46b055d16
1 #ifndef __WILC_LOG_H__
2 #define __WILC_LOG_H__
4 /* Errors will always get printed */
5 #define WILC_ERROR(...) do { WILC_PRINTF("(ERR)(%s:%d) ", __WILC_FUNCTION__, __WILC_LINE__); \
6 WILC_PRINTF(__VA_ARGS__); \
7 } while (0)
9 /* Wraning only printed if verbosity is 1 or more */
10 #if (WILC_LOG_VERBOSITY_LEVEL > 0)
11 #define WILC_WARN(...) do { WILC_PRINTF("(WRN)"); \
12 WILC_PRINTF(__VA_ARGS__); \
13 } while (0)
14 #else
15 #define WILC_WARN(...) (0)
16 #endif
18 /* Info only printed if verbosity is 2 or more */
19 #if (WILC_LOG_VERBOSITY_LEVEL > 1)
20 #define WILC_INFO(...) do { WILC_PRINTF("(INF)"); \
21 WILC_PRINTF(__VA_ARGS__); \
22 } while (0)
23 #else
24 #define WILC_INFO(...) (0)
25 #endif
27 /* Debug is only printed if verbosity is 3 or more */
28 #if (WILC_LOG_VERBOSITY_LEVEL > 2)
29 #define WILC_DBG(...) do { WILC_PRINTF("(DBG)(%s:%d) ", __WILC_FUNCTION__, __WILC_LINE__); \
30 WILC_PRINTF(__VA_ARGS__); \
31 } while (0)
33 #else
34 #define WILC_DBG(...) (0)
35 #endif
37 /* Function In/Out is only printed if verbosity is 4 or more */
38 #if (WILC_LOG_VERBOSITY_LEVEL > 3)
39 #define WILC_FN_IN do { WILC_PRINTF("(FIN) (%s:%d) \n", __WILC_FUNCTION__, __WILC_LINE__); } while (0)
40 #define WILC_FN_OUT(ret) do { WILC_PRINTF("(FOUT) (%s:%d) %d.\n", __WILC_FUNCTION__, __WILC_LINE__, (ret)); } while (0)
41 #else
42 #define WILC_FN_IN (0)
43 #define WILC_FN_OUT(ret) (0)
44 #endif
47 #endif