diff options
| author | Erik Hugne <[email protected]> | 2012-06-29 04:16:37 +0000 |
|---|---|---|
| committer | Paul Gortmaker <[email protected]> | 2012-07-13 23:24:44 +0000 |
| commit | 2cf8aa19fe8bec578b707daa383ebff80e3f81a1 (patch) | |
| tree | bd800510d0e01d441e25dd476228462106eaa9ea /net/tipc/core.c | |
| parent | tipc: limit error messages relating to memory leak to one line (diff) | |
| download | kernel-2cf8aa19fe8bec578b707daa383ebff80e3f81a1.tar.gz kernel-2cf8aa19fe8bec578b707daa383ebff80e3f81a1.zip | |
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 <[email protected]>
Signed-off-by: Jon Maloy <[email protected]>
[PG: use pr_fmt as suggested by Joe Perches <[email protected]>]
Signed-off-by: Paul Gortmaker <[email protected]>
Diffstat (limited to 'net/tipc/core.c')
| -rw-r--r-- | net/tipc/core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index f7b95239ebda..3689cb4067c8 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c @@ -34,14 +34,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <linux/module.h> - #include "core.h" #include "ref.h" #include "name_table.h" #include "subscr.h" #include "config.h" +#include <linux/module.h> #ifndef CONFIG_TIPC_PORTS #define CONFIG_TIPC_PORTS 8191 @@ -162,9 +161,9 @@ static int __init tipc_init(void) int res; if (tipc_log_resize(CONFIG_TIPC_LOG) != 0) - warn("Unable to create log buffer\n"); + pr_warn("Unable to create log buffer\n"); - info("Activated (version " TIPC_MOD_VER ")\n"); + pr_info("Activated (version " TIPC_MOD_VER ")\n"); tipc_own_addr = 0; tipc_remote_management = 1; @@ -175,9 +174,9 @@ static int __init tipc_init(void) res = tipc_core_start(); if (res) - err("Unable to start in single node mode\n"); + pr_err("Unable to start in single node mode\n"); else - info("Started in single node mode\n"); + pr_info("Started in single node mode\n"); return res; } @@ -185,7 +184,7 @@ static void __exit tipc_exit(void) { tipc_core_stop_net(); tipc_core_stop(); - info("Deactivated\n"); + pr_info("Deactivated\n"); } module_init(tipc_init); |
