aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.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/subscr.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/subscr.c')
-rw-r--r--net/tipc/subscr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index f976e9cd6a72..5ed5965eb0be 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -305,8 +305,8 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s,
305 305
306 /* Refuse subscription if global limit exceeded */ 306 /* Refuse subscription if global limit exceeded */
307 if (atomic_read(&topsrv.subscription_count) >= tipc_max_subscriptions) { 307 if (atomic_read(&topsrv.subscription_count) >= tipc_max_subscriptions) {
308 warn("Subscription rejected, subscription limit reached (%u)\n", 308 pr_warn("Subscription rejected, limit reached (%u)\n",
309 tipc_max_subscriptions); 309 tipc_max_subscriptions);
310 subscr_terminate(subscriber); 310 subscr_terminate(subscriber);
311 return NULL; 311 return NULL;
312 } 312 }
@@ -314,7 +314,7 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s,
314 /* Allocate subscription object */ 314 /* Allocate subscription object */
315 sub = kmalloc(sizeof(*sub), GFP_ATOMIC); 315 sub = kmalloc(sizeof(*sub), GFP_ATOMIC);
316 if (!sub) { 316 if (!sub) {
317 warn("Subscription rejected, no memory\n"); 317 pr_warn("Subscription rejected, no memory\n");
318 subscr_terminate(subscriber); 318 subscr_terminate(subscriber);
319 return NULL; 319 return NULL;
320 } 320 }
@@ -328,7 +328,7 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s,
328 if ((!(sub->filter & TIPC_SUB_PORTS) == 328 if ((!(sub->filter & TIPC_SUB_PORTS) ==
329 !(sub->filter & TIPC_SUB_SERVICE)) || 329 !(sub->filter & TIPC_SUB_SERVICE)) ||
330 (sub->seq.lower > sub->seq.upper)) { 330 (sub->seq.lower > sub->seq.upper)) {
331 warn("Subscription rejected, illegal request\n"); 331 pr_warn("Subscription rejected, illegal request\n");
332 kfree(sub); 332 kfree(sub);
333 subscr_terminate(subscriber); 333 subscr_terminate(subscriber);
334 return NULL; 334 return NULL;
@@ -440,7 +440,7 @@ static void subscr_named_msg_event(void *usr_handle,
440 /* Create subscriber object */ 440 /* Create subscriber object */
441 subscriber = kzalloc(sizeof(struct tipc_subscriber), GFP_ATOMIC); 441 subscriber = kzalloc(sizeof(struct tipc_subscriber), GFP_ATOMIC);
442 if (subscriber == NULL) { 442 if (subscriber == NULL) {
443 warn("Subscriber rejected, no memory\n"); 443 pr_warn("Subscriber rejected, no memory\n");
444 return; 444 return;
445 } 445 }
446 INIT_LIST_HEAD(&subscriber->subscription_list); 446 INIT_LIST_HEAD(&subscriber->subscription_list);
@@ -458,7 +458,7 @@ static void subscr_named_msg_event(void *usr_handle,
458 NULL, 458 NULL,
459 &subscriber->port_ref); 459 &subscriber->port_ref);
460 if (subscriber->port_ref == 0) { 460 if (subscriber->port_ref == 0) {
461 warn("Subscriber rejected, unable to create port\n"); 461 pr_warn("Subscriber rejected, unable to create port\n");
462 kfree(subscriber); 462 kfree(subscriber);
463 return; 463 return;
464 } 464 }
@@ -517,7 +517,7 @@ int tipc_subscr_start(void)
517 return 0; 517 return 0;
518 518
519failed: 519failed:
520 err("Failed to create subscription service\n"); 520 pr_err("Failed to create subscription service\n");
521 return res; 521 return res;
522} 522}
523 523