aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.c
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2012-06-29 00:16:37 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-07-13 19:24:44 -0400
commit2cf8aa19fe8bec578b707daa383ebff80e3f81a1 (patch)
treebd800510d0e01d441e25dd476228462106eaa9ea /net/tipc/core.c
parentf705ab956b3a0377181c9d73b235ad5bf4020937 (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.c')
-rw-r--r--net/tipc/core.c13
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 @@
34 * POSSIBILITY OF SUCH DAMAGE. 34 * POSSIBILITY OF SUCH DAMAGE.
35 */ 35 */
36 36
37#include <linux/module.h>
38
39#include "core.h" 37#include "core.h"
40#include "ref.h" 38#include "ref.h"
41#include "name_table.h" 39#include "name_table.h"
42#include "subscr.h" 40#include "subscr.h"
43#include "config.h" 41#include "config.h"
44 42
43#include <linux/module.h>
45 44
46#ifndef CONFIG_TIPC_PORTS 45#ifndef CONFIG_TIPC_PORTS
47#define CONFIG_TIPC_PORTS 8191 46#define CONFIG_TIPC_PORTS 8191
@@ -162,9 +161,9 @@ static int __init tipc_init(void)
162 int res; 161 int res;
163 162
164 if (tipc_log_resize(CONFIG_TIPC_LOG) != 0) 163 if (tipc_log_resize(CONFIG_TIPC_LOG) != 0)
165 warn("Unable to create log buffer\n"); 164 pr_warn("Unable to create log buffer\n");
166 165
167 info("Activated (version " TIPC_MOD_VER ")\n"); 166 pr_info("Activated (version " TIPC_MOD_VER ")\n");
168 167
169 tipc_own_addr = 0; 168 tipc_own_addr = 0;
170 tipc_remote_management = 1; 169 tipc_remote_management = 1;
@@ -175,9 +174,9 @@ static int __init tipc_init(void)
175 174
176 res = tipc_core_start(); 175 res = tipc_core_start();
177 if (res) 176 if (res)
178 err("Unable to start in single node mode\n"); 177 pr_err("Unable to start in single node mode\n");
179 else 178 else
180 info("Started in single node mode\n"); 179 pr_info("Started in single node mode\n");
181 return res; 180 return res;
182} 181}
183 182
@@ -185,7 +184,7 @@ static void __exit tipc_exit(void)
185{ 184{
186 tipc_core_stop_net(); 185 tipc_core_stop_net();
187 tipc_core_stop(); 186 tipc_core_stop();
188 info("Deactivated\n"); 187 pr_info("Deactivated\n");
189} 188}
190 189
191module_init(tipc_init); 190module_init(tipc_init);