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) | |
download | op-kernel-dev-2cf8aa19fe8bec578b707daa383ebff80e3f81a1.zip op-kernel-dev-2cf8aa19fe8bec578b707daa383ebff80e3f81a1.tar.gz |
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 2a9bb99..c376ec0 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -37,6 +37,8 @@ #ifndef _TIPC_CORE_H #define _TIPC_CORE_H +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/tipc.h> #include <linux/tipc_config.h> #include <linux/types.h> @@ -89,13 +91,6 @@ void tipc_printf(struct print_buf *, const char *fmt, ...); #define TIPC_OUTPUT TIPC_LOG #endif -#define err(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ - KERN_ERR "TIPC: " fmt, ## arg) -#define warn(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ - KERN_WARNING "TIPC: " fmt, ## arg) -#define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ - KERN_NOTICE "TIPC: " fmt, ## arg) - #ifdef CONFIG_TIPC_DEBUG /* @@ -105,15 +100,12 @@ void tipc_printf(struct print_buf *, const char *fmt, ...); #define DBG_OUTPUT TIPC_LOG #endif -#define dbg(fmt, arg...) tipc_printf(DBG_OUTPUT, KERN_DEBUG fmt, ## arg); - #define msg_dbg(msg, txt) tipc_msg_dbg(DBG_OUTPUT, msg, txt); void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); #else -#define dbg(fmt, arg...) do {} while (0) #define msg_dbg(msg, txt) do {} while (0) #define tipc_msg_dbg(buf, msg, txt) do {} while (0) |