diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2009-12-15 23:26:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-23 17:13:31 -0500 |
commit | 0df828f670b1fd8c469f3d60472ddca0d0f51fcf (patch) | |
tree | 37ff2a14a2238d38fc42ad7e471a62095a698790 /drivers/misc/iwmc3200top/log.h | |
parent | 9fa4d67c6e4d678271798f006ca1d945e8b2bd5c (diff) |
iwmc3200top: cleanup log messages
1. add TRACE level
2. use TRACE where needed to reduce the noise
3 don't INFOEX from driver
4. add DUMP level for packets dumps
5. use correct context for the log messages
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/misc/iwmc3200top/log.h')
-rw-r--r-- | drivers/misc/iwmc3200top/log.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/drivers/misc/iwmc3200top/log.h b/drivers/misc/iwmc3200top/log.h index aba8121f978c..4434bb16cea7 100644 --- a/drivers/misc/iwmc3200top/log.h +++ b/drivers/misc/iwmc3200top/log.h | |||
@@ -37,13 +37,26 @@ | |||
37 | #define LOG_SEV_INFO 3 | 37 | #define LOG_SEV_INFO 3 |
38 | #define LOG_SEV_INFOEX 4 | 38 | #define LOG_SEV_INFOEX 4 |
39 | 39 | ||
40 | #define LOG_SEV_FILTER_ALL \ | 40 | /* Log levels not defined for FW */ |
41 | (BIT(LOG_SEV_CRITICAL) | \ | 41 | #define LOG_SEV_TRACE 5 |
42 | BIT(LOG_SEV_ERROR) | \ | 42 | #define LOG_SEV_DUMP 6 |
43 | BIT(LOG_SEV_WARNING) | \ | 43 | |
44 | BIT(LOG_SEV_INFO) | \ | 44 | #define LOG_SEV_FW_FILTER_ALL \ |
45 | (BIT(LOG_SEV_CRITICAL) | \ | ||
46 | BIT(LOG_SEV_ERROR) | \ | ||
47 | BIT(LOG_SEV_WARNING) | \ | ||
48 | BIT(LOG_SEV_INFO) | \ | ||
45 | BIT(LOG_SEV_INFOEX)) | 49 | BIT(LOG_SEV_INFOEX)) |
46 | 50 | ||
51 | #define LOG_SEV_FILTER_ALL \ | ||
52 | (BIT(LOG_SEV_CRITICAL) | \ | ||
53 | BIT(LOG_SEV_ERROR) | \ | ||
54 | BIT(LOG_SEV_WARNING) | \ | ||
55 | BIT(LOG_SEV_INFO) | \ | ||
56 | BIT(LOG_SEV_INFOEX) | \ | ||
57 | BIT(LOG_SEV_TRACE) | \ | ||
58 | BIT(LOG_SEV_DUMP)) | ||
59 | |||
47 | /* log source */ | 60 | /* log source */ |
48 | #define LOG_SRC_INIT 0 | 61 | #define LOG_SRC_INIT 0 |
49 | #define LOG_SRC_DEBUGFS 1 | 62 | #define LOG_SRC_DEBUGFS 1 |
@@ -104,16 +117,16 @@ do { \ | |||
104 | __func__, __LINE__, ##args); \ | 117 | __func__, __LINE__, ##args); \ |
105 | } while (0) | 118 | } while (0) |
106 | 119 | ||
107 | #define LOG_INFOEX(priv, src, fmt, args...) \ | 120 | #define LOG_TRACE(priv, src, fmt, args...) \ |
108 | do { \ | 121 | do { \ |
109 | if (iwmct_logdefs[LOG_SRC_ ## src] & BIT(LOG_SEV_INFOEX)) \ | 122 | if (iwmct_logdefs[LOG_SRC_ ## src] & BIT(LOG_SEV_TRACE)) \ |
110 | dev_dbg(priv2dev(priv), "%s %d: " fmt, \ | 123 | dev_dbg(priv2dev(priv), "%s %d: " fmt, \ |
111 | __func__, __LINE__, ##args); \ | 124 | __func__, __LINE__, ##args); \ |
112 | } while (0) | 125 | } while (0) |
113 | 126 | ||
114 | #define LOG_HEXDUMP(src, ptr, len) \ | 127 | #define LOG_HEXDUMP(src, ptr, len) \ |
115 | do { \ | 128 | do { \ |
116 | if (iwmct_logdefs[LOG_SRC_ ## src] & BIT(LOG_SEV_INFOEX)) \ | 129 | if (iwmct_logdefs[LOG_SRC_ ## src] & BIT(LOG_SEV_DUMP)) \ |
117 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_NONE, \ | 130 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_NONE, \ |
118 | 16, 1, ptr, len, false); \ | 131 | 16, 1, ptr, len, false); \ |
119 | } while (0) | 132 | } while (0) |
@@ -142,7 +155,7 @@ ssize_t store_iwmct_log_level_fw(struct device *d, | |||
142 | #define LOG_ERROR(priv, src, fmt, args...) | 155 | #define LOG_ERROR(priv, src, fmt, args...) |
143 | #define LOG_WARNING(priv, src, fmt, args...) | 156 | #define LOG_WARNING(priv, src, fmt, args...) |
144 | #define LOG_INFO(priv, src, fmt, args...) | 157 | #define LOG_INFO(priv, src, fmt, args...) |
145 | #define LOG_INFOEX(priv, src, fmt, args...) | 158 | #define LOG_TRACE(priv, src, fmt, args...) |
146 | #define LOG_HEXDUMP(src, ptr, len) | 159 | #define LOG_HEXDUMP(src, ptr, len) |
147 | 160 | ||
148 | static inline void iwmct_log_top_message(struct iwmct_priv *priv, | 161 | static inline void iwmct_log_top_message(struct iwmct_priv *priv, |