aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.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/node.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/node.c')
-rw-r--r--net/tipc/node.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index d4fd341e6e0d..d21db204e25a 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -105,7 +105,7 @@ struct tipc_node *tipc_node_create(u32 addr)
105 n_ptr = kzalloc(sizeof(*n_ptr), GFP_ATOMIC); 105 n_ptr = kzalloc(sizeof(*n_ptr), GFP_ATOMIC);
106 if (!n_ptr) { 106 if (!n_ptr) {
107 spin_unlock_bh(&node_create_lock); 107 spin_unlock_bh(&node_create_lock);
108 warn("Node creation failed, no memory\n"); 108 pr_warn("Node creation failed, no memory\n");
109 return NULL; 109 return NULL;
110 } 110 }
111 111
@@ -151,8 +151,8 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
151 151
152 n_ptr->working_links++; 152 n_ptr->working_links++;
153 153
154 info("Established link <%s> on network plane %c\n", 154 pr_info("Established link <%s> on network plane %c\n",
155 l_ptr->name, l_ptr->b_ptr->net_plane); 155 l_ptr->name, l_ptr->b_ptr->net_plane);
156 156
157 if (!active[0]) { 157 if (!active[0]) {
158 active[0] = active[1] = l_ptr; 158 active[0] = active[1] = l_ptr;
@@ -160,7 +160,7 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
160 return; 160 return;
161 } 161 }
162 if (l_ptr->priority < active[0]->priority) { 162 if (l_ptr->priority < active[0]->priority) {
163 info("New link <%s> becomes standby\n", l_ptr->name); 163 pr_info("New link <%s> becomes standby\n", l_ptr->name);
164 return; 164 return;
165 } 165 }
166 tipc_link_send_duplicate(active[0], l_ptr); 166 tipc_link_send_duplicate(active[0], l_ptr);
@@ -168,9 +168,9 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
168 active[0] = l_ptr; 168 active[0] = l_ptr;
169 return; 169 return;
170 } 170 }
171 info("Old link <%s> becomes standby\n", active[0]->name); 171 pr_info("Old link <%s> becomes standby\n", active[0]->name);
172 if (active[1] != active[0]) 172 if (active[1] != active[0])
173 info("Old link <%s> becomes standby\n", active[1]->name); 173 pr_info("Old link <%s> becomes standby\n", active[1]->name);
174 active[0] = active[1] = l_ptr; 174 active[0] = active[1] = l_ptr;
175} 175}
176 176
@@ -211,11 +211,11 @@ void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
211 n_ptr->working_links--; 211 n_ptr->working_links--;
212 212
213 if (!tipc_link_is_active(l_ptr)) { 213 if (!tipc_link_is_active(l_ptr)) {
214 info("Lost standby link <%s> on network plane %c\n", 214 pr_info("Lost standby link <%s> on network plane %c\n",
215 l_ptr->name, l_ptr->b_ptr->net_plane); 215 l_ptr->name, l_ptr->b_ptr->net_plane);
216 return; 216 return;
217 } 217 }
218 info("Lost link <%s> on network plane %c\n", 218 pr_info("Lost link <%s> on network plane %c\n",
219 l_ptr->name, l_ptr->b_ptr->net_plane); 219 l_ptr->name, l_ptr->b_ptr->net_plane);
220 220
221 active = &n_ptr->active_links[0]; 221 active = &n_ptr->active_links[0];
@@ -290,8 +290,8 @@ static void node_lost_contact(struct tipc_node *n_ptr)
290 char addr_string[16]; 290 char addr_string[16];
291 u32 i; 291 u32 i;
292 292
293 info("Lost contact with %s\n", 293 pr_info("Lost contact with %s\n",
294 tipc_addr_string_fill(addr_string, n_ptr->addr)); 294 tipc_addr_string_fill(addr_string, n_ptr->addr));
295 295
296 /* Flush broadcast link info associated with lost node */ 296 /* Flush broadcast link info associated with lost node */
297 if (n_ptr->bclink.supported) { 297 if (n_ptr->bclink.supported) {