diff options
author | Erik Hugne <erik.hugne@ericsson.com> | 2012-06-29 00:16:37 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-07-13 19:24:44 -0400 |
commit | 2cf8aa19fe8bec578b707daa383ebff80e3f81a1 (patch) | |
tree | bd800510d0e01d441e25dd476228462106eaa9ea /net/tipc/core.h | |
parent | f705ab956b3a0377181c9d73b235ad5bf4020937 (diff) |
tipc: use standard printk shortcut macros (pr_err etc.)
All messages should go directly to the kernel log. The TIPC
specific error, warning, info and debug trace macro's are
removed and all references replaced with pr_err, pr_warn,
pr_info and pr_debug.
Commonly used sub-strings are explicitly declared as a const
char to reduce .text size.
Note that this means the debug messages (changed to pr_debug),
are now enabled through dynamic debugging, instead of a TIPC
specific Kconfig option (TIPC_DEBUG). The latter will be
phased out completely
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
[PG: use pr_fmt as suggested by Joe Perches <joe@perches.com>]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r-- | net/tipc/core.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h index 2a9bb99537b3..c376ec06e69a 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
@@ -37,6 +37,8 @@ | |||
37 | #ifndef _TIPC_CORE_H | 37 | #ifndef _TIPC_CORE_H |
38 | #define _TIPC_CORE_H | 38 | #define _TIPC_CORE_H |
39 | 39 | ||
40 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
41 | |||
40 | #include <linux/tipc.h> | 42 | #include <linux/tipc.h> |
41 | #include <linux/tipc_config.h> | 43 | #include <linux/tipc_config.h> |
42 | #include <linux/types.h> | 44 | #include <linux/types.h> |
@@ -89,13 +91,6 @@ void tipc_printf(struct print_buf *, const char *fmt, ...); | |||
89 | #define TIPC_OUTPUT TIPC_LOG | 91 | #define TIPC_OUTPUT TIPC_LOG |
90 | #endif | 92 | #endif |
91 | 93 | ||
92 | #define err(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ | ||
93 | KERN_ERR "TIPC: " fmt, ## arg) | ||
94 | #define warn(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ | ||
95 | KERN_WARNING "TIPC: " fmt, ## arg) | ||
96 | #define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ | ||
97 | KERN_NOTICE "TIPC: " fmt, ## arg) | ||
98 | |||
99 | #ifdef CONFIG_TIPC_DEBUG | 94 | #ifdef CONFIG_TIPC_DEBUG |
100 | 95 | ||
101 | /* | 96 | /* |
@@ -105,15 +100,12 @@ void tipc_printf(struct print_buf *, const char *fmt, ...); | |||
105 | #define DBG_OUTPUT TIPC_LOG | 100 | #define DBG_OUTPUT TIPC_LOG |
106 | #endif | 101 | #endif |
107 | 102 | ||
108 | #define dbg(fmt, arg...) tipc_printf(DBG_OUTPUT, KERN_DEBUG fmt, ## arg); | ||
109 | |||
110 | #define msg_dbg(msg, txt) tipc_msg_dbg(DBG_OUTPUT, msg, txt); | 103 | #define msg_dbg(msg, txt) tipc_msg_dbg(DBG_OUTPUT, msg, txt); |
111 | 104 | ||
112 | void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); | 105 | void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); |
113 | 106 | ||
114 | #else | 107 | #else |
115 | 108 | ||
116 | #define dbg(fmt, arg...) do {} while (0) | ||
117 | #define msg_dbg(msg, txt) do {} while (0) | 109 | #define msg_dbg(msg, txt) do {} while (0) |
118 | 110 | ||
119 | #define tipc_msg_dbg(buf, msg, txt) do {} while (0) | 111 | #define tipc_msg_dbg(buf, msg, txt) do {} while (0) |