diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/bcast.c | 2 | ||||
-rw-r--r-- | net/tipc/bearer.c | 52 | ||||
-rw-r--r-- | net/tipc/config.c | 6 | ||||
-rw-r--r-- | net/tipc/core.c | 13 | ||||
-rw-r--r-- | net/tipc/core.h | 12 | ||||
-rw-r--r-- | net/tipc/discover.c | 4 | ||||
-rw-r--r-- | net/tipc/handler.c | 4 | ||||
-rw-r--r-- | net/tipc/link.c | 116 | ||||
-rw-r--r-- | net/tipc/name_distr.c | 25 | ||||
-rw-r--r-- | net/tipc/name_table.c | 40 | ||||
-rw-r--r-- | net/tipc/net.c | 8 | ||||
-rw-r--r-- | net/tipc/netlink.c | 2 | ||||
-rw-r--r-- | net/tipc/node.c | 22 | ||||
-rw-r--r-- | net/tipc/node_subscr.c | 3 | ||||
-rw-r--r-- | net/tipc/port.c | 8 | ||||
-rw-r--r-- | net/tipc/ref.c | 10 | ||||
-rw-r--r-- | net/tipc/socket.c | 10 | ||||
-rw-r--r-- | net/tipc/subscr.c | 14 |
18 files changed, 177 insertions, 174 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index d9df34fbd7ca..fef3689bcf23 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -880,7 +880,7 @@ void tipc_port_list_add(struct tipc_port_list *pl_ptr, u32 port) | |||
880 | if (!item->next) { | 880 | if (!item->next) { |
881 | item->next = kmalloc(sizeof(*item), GFP_ATOMIC); | 881 | item->next = kmalloc(sizeof(*item), GFP_ATOMIC); |
882 | if (!item->next) { | 882 | if (!item->next) { |
883 | warn("Incomplete multicast delivery, no memory\n"); | 883 | pr_warn("Incomplete multicast delivery, no memory\n"); |
884 | return; | 884 | return; |
885 | } | 885 | } |
886 | item->next->next = NULL; | 886 | item->next->next = NULL; |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 86b703f55092..1840e1fadd2e 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -123,7 +123,7 @@ int tipc_register_media(struct tipc_media *m_ptr) | |||
123 | exit: | 123 | exit: |
124 | write_unlock_bh(&tipc_net_lock); | 124 | write_unlock_bh(&tipc_net_lock); |
125 | if (res) | 125 | if (res) |
126 | warn("Media <%s> registration error\n", m_ptr->name); | 126 | pr_warn("Media <%s> registration error\n", m_ptr->name); |
127 | return res; | 127 | return res; |
128 | } | 128 | } |
129 | 129 | ||
@@ -418,12 +418,12 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority) | |||
418 | int res = -EINVAL; | 418 | int res = -EINVAL; |
419 | 419 | ||
420 | if (!tipc_own_addr) { | 420 | if (!tipc_own_addr) { |
421 | warn("Bearer <%s> rejected, not supported in standalone mode\n", | 421 | pr_warn("Bearer <%s> rejected, not supported in standalone mode\n", |
422 | name); | 422 | name); |
423 | return -ENOPROTOOPT; | 423 | return -ENOPROTOOPT; |
424 | } | 424 | } |
425 | if (!bearer_name_validate(name, &b_names)) { | 425 | if (!bearer_name_validate(name, &b_names)) { |
426 | warn("Bearer <%s> rejected, illegal name\n", name); | 426 | pr_warn("Bearer <%s> rejected, illegal name\n", name); |
427 | return -EINVAL; | 427 | return -EINVAL; |
428 | } | 428 | } |
429 | if (tipc_addr_domain_valid(disc_domain) && | 429 | if (tipc_addr_domain_valid(disc_domain) && |
@@ -435,12 +435,13 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority) | |||
435 | res = 0; /* accept specified node in own cluster */ | 435 | res = 0; /* accept specified node in own cluster */ |
436 | } | 436 | } |
437 | if (res) { | 437 | if (res) { |
438 | warn("Bearer <%s> rejected, illegal discovery domain\n", name); | 438 | pr_warn("Bearer <%s> rejected, illegal discovery domain\n", |
439 | name); | ||
439 | return -EINVAL; | 440 | return -EINVAL; |
440 | } | 441 | } |
441 | if ((priority > TIPC_MAX_LINK_PRI) && | 442 | if ((priority > TIPC_MAX_LINK_PRI) && |
442 | (priority != TIPC_MEDIA_LINK_PRI)) { | 443 | (priority != TIPC_MEDIA_LINK_PRI)) { |
443 | warn("Bearer <%s> rejected, illegal priority\n", name); | 444 | pr_warn("Bearer <%s> rejected, illegal priority\n", name); |
444 | return -EINVAL; | 445 | return -EINVAL; |
445 | } | 446 | } |
446 | 447 | ||
@@ -448,8 +449,8 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority) | |||
448 | 449 | ||
449 | m_ptr = tipc_media_find(b_names.media_name); | 450 | m_ptr = tipc_media_find(b_names.media_name); |
450 | if (!m_ptr) { | 451 | if (!m_ptr) { |
451 | warn("Bearer <%s> rejected, media <%s> not registered\n", name, | 452 | pr_warn("Bearer <%s> rejected, media <%s> not registered\n", |
452 | b_names.media_name); | 453 | name, b_names.media_name); |
453 | goto exit; | 454 | goto exit; |
454 | } | 455 | } |
455 | 456 | ||
@@ -465,24 +466,25 @@ restart: | |||
465 | continue; | 466 | continue; |
466 | } | 467 | } |
467 | if (!strcmp(name, tipc_bearers[i].name)) { | 468 | if (!strcmp(name, tipc_bearers[i].name)) { |
468 | warn("Bearer <%s> rejected, already enabled\n", name); | 469 | pr_warn("Bearer <%s> rejected, already enabled\n", |
470 | name); | ||
469 | goto exit; | 471 | goto exit; |
470 | } | 472 | } |
471 | if ((tipc_bearers[i].priority == priority) && | 473 | if ((tipc_bearers[i].priority == priority) && |
472 | (++with_this_prio > 2)) { | 474 | (++with_this_prio > 2)) { |
473 | if (priority-- == 0) { | 475 | if (priority-- == 0) { |
474 | warn("Bearer <%s> rejected, duplicate priority\n", | 476 | pr_warn("Bearer <%s> rejected, duplicate priority\n", |
475 | name); | 477 | name); |
476 | goto exit; | 478 | goto exit; |
477 | } | 479 | } |
478 | warn("Bearer <%s> priority adjustment required %u->%u\n", | 480 | pr_warn("Bearer <%s> priority adjustment required %u->%u\n", |
479 | name, priority + 1, priority); | 481 | name, priority + 1, priority); |
480 | goto restart; | 482 | goto restart; |
481 | } | 483 | } |
482 | } | 484 | } |
483 | if (bearer_id >= MAX_BEARERS) { | 485 | if (bearer_id >= MAX_BEARERS) { |
484 | warn("Bearer <%s> rejected, bearer limit reached (%u)\n", | 486 | pr_warn("Bearer <%s> rejected, bearer limit reached (%u)\n", |
485 | name, MAX_BEARERS); | 487 | name, MAX_BEARERS); |
486 | goto exit; | 488 | goto exit; |
487 | } | 489 | } |
488 | 490 | ||
@@ -490,7 +492,8 @@ restart: | |||
490 | strcpy(b_ptr->name, name); | 492 | strcpy(b_ptr->name, name); |
491 | res = m_ptr->enable_bearer(b_ptr); | 493 | res = m_ptr->enable_bearer(b_ptr); |
492 | if (res) { | 494 | if (res) { |
493 | warn("Bearer <%s> rejected, enable failure (%d)\n", name, -res); | 495 | pr_warn("Bearer <%s> rejected, enable failure (%d)\n", |
496 | name, -res); | ||
494 | goto exit; | 497 | goto exit; |
495 | } | 498 | } |
496 | 499 | ||
@@ -508,12 +511,13 @@ restart: | |||
508 | res = tipc_disc_create(b_ptr, &m_ptr->bcast_addr, disc_domain); | 511 | res = tipc_disc_create(b_ptr, &m_ptr->bcast_addr, disc_domain); |
509 | if (res) { | 512 | if (res) { |
510 | bearer_disable(b_ptr); | 513 | bearer_disable(b_ptr); |
511 | warn("Bearer <%s> rejected, discovery object creation failed\n", | 514 | pr_warn("Bearer <%s> rejected, discovery object creation failed\n", |
512 | name); | 515 | name); |
513 | goto exit; | 516 | goto exit; |
514 | } | 517 | } |
515 | info("Enabled bearer <%s>, discovery domain %s, priority %u\n", | 518 | pr_info("Enabled bearer <%s>, discovery domain %s, priority %u\n", |
516 | name, tipc_addr_string_fill(addr_string, disc_domain), priority); | 519 | name, |
520 | tipc_addr_string_fill(addr_string, disc_domain), priority); | ||
517 | exit: | 521 | exit: |
518 | write_unlock_bh(&tipc_net_lock); | 522 | write_unlock_bh(&tipc_net_lock); |
519 | return res; | 523 | return res; |
@@ -531,12 +535,12 @@ int tipc_block_bearer(const char *name) | |||
531 | read_lock_bh(&tipc_net_lock); | 535 | read_lock_bh(&tipc_net_lock); |
532 | b_ptr = tipc_bearer_find(name); | 536 | b_ptr = tipc_bearer_find(name); |
533 | if (!b_ptr) { | 537 | if (!b_ptr) { |
534 | warn("Attempt to block unknown bearer <%s>\n", name); | 538 | pr_warn("Attempt to block unknown bearer <%s>\n", name); |
535 | read_unlock_bh(&tipc_net_lock); | 539 | read_unlock_bh(&tipc_net_lock); |
536 | return -EINVAL; | 540 | return -EINVAL; |
537 | } | 541 | } |
538 | 542 | ||
539 | info("Blocking bearer <%s>\n", name); | 543 | pr_info("Blocking bearer <%s>\n", name); |
540 | spin_lock_bh(&b_ptr->lock); | 544 | spin_lock_bh(&b_ptr->lock); |
541 | b_ptr->blocked = 1; | 545 | b_ptr->blocked = 1; |
542 | list_splice_init(&b_ptr->cong_links, &b_ptr->links); | 546 | list_splice_init(&b_ptr->cong_links, &b_ptr->links); |
@@ -562,7 +566,7 @@ static void bearer_disable(struct tipc_bearer *b_ptr) | |||
562 | struct tipc_link *l_ptr; | 566 | struct tipc_link *l_ptr; |
563 | struct tipc_link *temp_l_ptr; | 567 | struct tipc_link *temp_l_ptr; |
564 | 568 | ||
565 | info("Disabling bearer <%s>\n", b_ptr->name); | 569 | pr_info("Disabling bearer <%s>\n", b_ptr->name); |
566 | spin_lock_bh(&b_ptr->lock); | 570 | spin_lock_bh(&b_ptr->lock); |
567 | b_ptr->blocked = 1; | 571 | b_ptr->blocked = 1; |
568 | b_ptr->media->disable_bearer(b_ptr); | 572 | b_ptr->media->disable_bearer(b_ptr); |
@@ -584,7 +588,7 @@ int tipc_disable_bearer(const char *name) | |||
584 | write_lock_bh(&tipc_net_lock); | 588 | write_lock_bh(&tipc_net_lock); |
585 | b_ptr = tipc_bearer_find(name); | 589 | b_ptr = tipc_bearer_find(name); |
586 | if (b_ptr == NULL) { | 590 | if (b_ptr == NULL) { |
587 | warn("Attempt to disable unknown bearer <%s>\n", name); | 591 | pr_warn("Attempt to disable unknown bearer <%s>\n", name); |
588 | res = -EINVAL; | 592 | res = -EINVAL; |
589 | } else { | 593 | } else { |
590 | bearer_disable(b_ptr); | 594 | bearer_disable(b_ptr); |
diff --git a/net/tipc/config.c b/net/tipc/config.c index c5712a343810..7978fdd99299 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c | |||
@@ -432,7 +432,7 @@ static void cfg_named_msg_event(void *userdata, | |||
432 | if ((size < sizeof(*req_hdr)) || | 432 | if ((size < sizeof(*req_hdr)) || |
433 | (size != TCM_ALIGN(ntohl(req_hdr->tcm_len))) || | 433 | (size != TCM_ALIGN(ntohl(req_hdr->tcm_len))) || |
434 | (ntohs(req_hdr->tcm_flags) != TCM_F_REQUEST)) { | 434 | (ntohs(req_hdr->tcm_flags) != TCM_F_REQUEST)) { |
435 | warn("Invalid configuration message discarded\n"); | 435 | pr_warn("Invalid configuration message discarded\n"); |
436 | return; | 436 | return; |
437 | } | 437 | } |
438 | 438 | ||
@@ -478,7 +478,7 @@ int tipc_cfg_init(void) | |||
478 | return 0; | 478 | return 0; |
479 | 479 | ||
480 | failed: | 480 | failed: |
481 | err("Unable to create configuration service\n"); | 481 | pr_err("Unable to create configuration service\n"); |
482 | return res; | 482 | return res; |
483 | } | 483 | } |
484 | 484 | ||
@@ -494,7 +494,7 @@ void tipc_cfg_reinit(void) | |||
494 | seq.lower = seq.upper = tipc_own_addr; | 494 | seq.lower = seq.upper = tipc_own_addr; |
495 | res = tipc_publish(config_port_ref, TIPC_ZONE_SCOPE, &seq); | 495 | res = tipc_publish(config_port_ref, TIPC_ZONE_SCOPE, &seq); |
496 | if (res) | 496 | if (res) |
497 | err("Unable to reinitialize configuration service\n"); | 497 | pr_err("Unable to reinitialize configuration service\n"); |
498 | } | 498 | } |
499 | 499 | ||
500 | void tipc_cfg_stop(void) | 500 | void tipc_cfg_stop(void) |
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 | ||
191 | module_init(tipc_init); | 190 | module_init(tipc_init); |
diff --git a/net/tipc/core.h b/net/tipc/core.h index 2a9bb99537b3..c376ec06e69a 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
@@ -37,6 +37,8 @@ | |||
37 | #ifndef _TIPC_CORE_H | 37 | #ifndef _TIPC_CORE_H |
38 | #define _TIPC_CORE_H | 38 | #define _TIPC_CORE_H |
39 | 39 | ||
40 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
41 | |||
40 | #include <linux/tipc.h> | 42 | #include <linux/tipc.h> |
41 | #include <linux/tipc_config.h> | 43 | #include <linux/tipc_config.h> |
42 | #include <linux/types.h> | 44 | #include <linux/types.h> |
@@ -89,13 +91,6 @@ void tipc_printf(struct print_buf *, const char *fmt, ...); | |||
89 | #define TIPC_OUTPUT TIPC_LOG | 91 | #define TIPC_OUTPUT TIPC_LOG |
90 | #endif | 92 | #endif |
91 | 93 | ||
92 | #define err(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ | ||
93 | KERN_ERR "TIPC: " fmt, ## arg) | ||
94 | #define warn(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ | ||
95 | KERN_WARNING "TIPC: " fmt, ## arg) | ||
96 | #define info(fmt, arg...) tipc_printf(TIPC_OUTPUT, \ | ||
97 | KERN_NOTICE "TIPC: " fmt, ## arg) | ||
98 | |||
99 | #ifdef CONFIG_TIPC_DEBUG | 94 | #ifdef CONFIG_TIPC_DEBUG |
100 | 95 | ||
101 | /* | 96 | /* |
@@ -105,15 +100,12 @@ void tipc_printf(struct print_buf *, const char *fmt, ...); | |||
105 | #define DBG_OUTPUT TIPC_LOG | 100 | #define DBG_OUTPUT TIPC_LOG |
106 | #endif | 101 | #endif |
107 | 102 | ||
108 | #define dbg(fmt, arg...) tipc_printf(DBG_OUTPUT, KERN_DEBUG fmt, ## arg); | ||
109 | |||
110 | #define msg_dbg(msg, txt) tipc_msg_dbg(DBG_OUTPUT, msg, txt); | 103 | #define msg_dbg(msg, txt) tipc_msg_dbg(DBG_OUTPUT, msg, txt); |
111 | 104 | ||
112 | void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); | 105 | void tipc_msg_dbg(struct print_buf *, struct tipc_msg *, const char *); |
113 | 106 | ||
114 | #else | 107 | #else |
115 | 108 | ||
116 | #define dbg(fmt, arg...) do {} while (0) | ||
117 | #define msg_dbg(msg, txt) do {} while (0) | 109 | #define msg_dbg(msg, txt) do {} while (0) |
118 | 110 | ||
119 | #define tipc_msg_dbg(buf, msg, txt) do {} while (0) | 111 | #define tipc_msg_dbg(buf, msg, txt) do {} while (0) |
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index ae054cfe179f..2f91f3770097 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -106,8 +106,8 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr, | |||
106 | tipc_printbuf_init(&pb, media_addr_str, sizeof(media_addr_str)); | 106 | tipc_printbuf_init(&pb, media_addr_str, sizeof(media_addr_str)); |
107 | tipc_media_addr_printf(&pb, media_addr); | 107 | tipc_media_addr_printf(&pb, media_addr); |
108 | tipc_printbuf_validate(&pb); | 108 | tipc_printbuf_validate(&pb); |
109 | warn("Duplicate %s using %s seen on <%s>\n", | 109 | pr_warn("Duplicate %s using %s seen on <%s>\n", node_addr_str, |
110 | node_addr_str, media_addr_str, b_ptr->name); | 110 | media_addr_str, b_ptr->name); |
111 | } | 111 | } |
112 | 112 | ||
113 | /** | 113 | /** |
diff --git a/net/tipc/handler.c b/net/tipc/handler.c index 9c6f22ff1c6d..7a52d3922f3c 100644 --- a/net/tipc/handler.c +++ b/net/tipc/handler.c | |||
@@ -57,14 +57,14 @@ unsigned int tipc_k_signal(Handler routine, unsigned long argument) | |||
57 | struct queue_item *item; | 57 | struct queue_item *item; |
58 | 58 | ||
59 | if (!handler_enabled) { | 59 | if (!handler_enabled) { |
60 | err("Signal request ignored by handler\n"); | 60 | pr_err("Signal request ignored by handler\n"); |
61 | return -ENOPROTOOPT; | 61 | return -ENOPROTOOPT; |
62 | } | 62 | } |
63 | 63 | ||
64 | spin_lock_bh(&qitem_lock); | 64 | spin_lock_bh(&qitem_lock); |
65 | item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC); | 65 | item = kmem_cache_alloc(tipc_queue_item_cache, GFP_ATOMIC); |
66 | if (!item) { | 66 | if (!item) { |
67 | err("Signal queue out of memory\n"); | 67 | pr_err("Signal queue out of memory\n"); |
68 | spin_unlock_bh(&qitem_lock); | 68 | spin_unlock_bh(&qitem_lock); |
69 | return -ENOMEM; | 69 | return -ENOMEM; |
70 | } | 70 | } |
diff --git a/net/tipc/link.c b/net/tipc/link.c index f6bf4830ddfe..e543b9f91ee0 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -41,6 +41,12 @@ | |||
41 | #include "discover.h" | 41 | #include "discover.h" |
42 | #include "config.h" | 42 | #include "config.h" |
43 | 43 | ||
44 | /* | ||
45 | * Error message prefixes | ||
46 | */ | ||
47 | static const char *link_co_err = "Link changeover error, "; | ||
48 | static const char *link_rst_msg = "Resetting link "; | ||
49 | static const char *link_unk_evt = "Unknown link event "; | ||
44 | 50 | ||
45 | /* | 51 | /* |
46 | * Out-of-range value for link session numbers | 52 | * Out-of-range value for link session numbers |
@@ -300,20 +306,20 @@ struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, | |||
300 | 306 | ||
301 | if (n_ptr->link_cnt >= 2) { | 307 | if (n_ptr->link_cnt >= 2) { |
302 | tipc_addr_string_fill(addr_string, n_ptr->addr); | 308 | tipc_addr_string_fill(addr_string, n_ptr->addr); |
303 | err("Attempt to establish third link to %s\n", addr_string); | 309 | pr_err("Attempt to establish third link to %s\n", addr_string); |
304 | return NULL; | 310 | return NULL; |
305 | } | 311 | } |
306 | 312 | ||
307 | if (n_ptr->links[b_ptr->identity]) { | 313 | if (n_ptr->links[b_ptr->identity]) { |
308 | tipc_addr_string_fill(addr_string, n_ptr->addr); | 314 | tipc_addr_string_fill(addr_string, n_ptr->addr); |
309 | err("Attempt to establish second link on <%s> to %s\n", | 315 | pr_err("Attempt to establish second link on <%s> to %s\n", |
310 | b_ptr->name, addr_string); | 316 | b_ptr->name, addr_string); |
311 | return NULL; | 317 | return NULL; |
312 | } | 318 | } |
313 | 319 | ||
314 | l_ptr = kzalloc(sizeof(*l_ptr), GFP_ATOMIC); | 320 | l_ptr = kzalloc(sizeof(*l_ptr), GFP_ATOMIC); |
315 | if (!l_ptr) { | 321 | if (!l_ptr) { |
316 | warn("Link creation failed, no memory\n"); | 322 | pr_warn("Link creation failed, no memory\n"); |
317 | return NULL; | 323 | return NULL; |
318 | } | 324 | } |
319 | 325 | ||
@@ -371,7 +377,7 @@ struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, | |||
371 | void tipc_link_delete(struct tipc_link *l_ptr) | 377 | void tipc_link_delete(struct tipc_link *l_ptr) |
372 | { | 378 | { |
373 | if (!l_ptr) { | 379 | if (!l_ptr) { |
374 | err("Attempt to delete non-existent link\n"); | 380 | pr_err("Attempt to delete non-existent link\n"); |
375 | return; | 381 | return; |
376 | } | 382 | } |
377 | 383 | ||
@@ -632,8 +638,8 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
632 | link_set_timer(l_ptr, cont_intv / 4); | 638 | link_set_timer(l_ptr, cont_intv / 4); |
633 | break; | 639 | break; |
634 | case RESET_MSG: | 640 | case RESET_MSG: |
635 | info("Resetting link <%s>, requested by peer\n", | 641 | pr_info("%s<%s>, requested by peer\n", link_rst_msg, |
636 | l_ptr->name); | 642 | l_ptr->name); |
637 | tipc_link_reset(l_ptr); | 643 | tipc_link_reset(l_ptr); |
638 | l_ptr->state = RESET_RESET; | 644 | l_ptr->state = RESET_RESET; |
639 | l_ptr->fsm_msg_cnt = 0; | 645 | l_ptr->fsm_msg_cnt = 0; |
@@ -642,7 +648,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
642 | link_set_timer(l_ptr, cont_intv); | 648 | link_set_timer(l_ptr, cont_intv); |
643 | break; | 649 | break; |
644 | default: | 650 | default: |
645 | err("Unknown link event %u in WW state\n", event); | 651 | pr_err("%s%u in WW state\n", link_unk_evt, event); |
646 | } | 652 | } |
647 | break; | 653 | break; |
648 | case WORKING_UNKNOWN: | 654 | case WORKING_UNKNOWN: |
@@ -654,8 +660,8 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
654 | link_set_timer(l_ptr, cont_intv); | 660 | link_set_timer(l_ptr, cont_intv); |
655 | break; | 661 | break; |
656 | case RESET_MSG: | 662 | case RESET_MSG: |
657 | info("Resetting link <%s>, requested by peer " | 663 | pr_info("%s<%s>, requested by peer while probing\n", |
658 | "while probing\n", l_ptr->name); | 664 | link_rst_msg, l_ptr->name); |
659 | tipc_link_reset(l_ptr); | 665 | tipc_link_reset(l_ptr); |
660 | l_ptr->state = RESET_RESET; | 666 | l_ptr->state = RESET_RESET; |
661 | l_ptr->fsm_msg_cnt = 0; | 667 | l_ptr->fsm_msg_cnt = 0; |
@@ -680,8 +686,8 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
680 | l_ptr->fsm_msg_cnt++; | 686 | l_ptr->fsm_msg_cnt++; |
681 | link_set_timer(l_ptr, cont_intv / 4); | 687 | link_set_timer(l_ptr, cont_intv / 4); |
682 | } else { /* Link has failed */ | 688 | } else { /* Link has failed */ |
683 | warn("Resetting link <%s>, peer not responding\n", | 689 | pr_warn("%s<%s>, peer not responding\n", |
684 | l_ptr->name); | 690 | link_rst_msg, l_ptr->name); |
685 | tipc_link_reset(l_ptr); | 691 | tipc_link_reset(l_ptr); |
686 | l_ptr->state = RESET_UNKNOWN; | 692 | l_ptr->state = RESET_UNKNOWN; |
687 | l_ptr->fsm_msg_cnt = 0; | 693 | l_ptr->fsm_msg_cnt = 0; |
@@ -692,7 +698,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
692 | } | 698 | } |
693 | break; | 699 | break; |
694 | default: | 700 | default: |
695 | err("Unknown link event %u in WU state\n", event); | 701 | pr_err("%s%u in WU state\n", link_unk_evt, event); |
696 | } | 702 | } |
697 | break; | 703 | break; |
698 | case RESET_UNKNOWN: | 704 | case RESET_UNKNOWN: |
@@ -726,7 +732,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
726 | link_set_timer(l_ptr, cont_intv); | 732 | link_set_timer(l_ptr, cont_intv); |
727 | break; | 733 | break; |
728 | default: | 734 | default: |
729 | err("Unknown link event %u in RU state\n", event); | 735 | pr_err("%s%u in RU state\n", link_unk_evt, event); |
730 | } | 736 | } |
731 | break; | 737 | break; |
732 | case RESET_RESET: | 738 | case RESET_RESET: |
@@ -751,11 +757,11 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) | |||
751 | link_set_timer(l_ptr, cont_intv); | 757 | link_set_timer(l_ptr, cont_intv); |
752 | break; | 758 | break; |
753 | default: | 759 | default: |
754 | err("Unknown link event %u in RR state\n", event); | 760 | pr_err("%s%u in RR state\n", link_unk_evt, event); |
755 | } | 761 | } |
756 | break; | 762 | break; |
757 | default: | 763 | default: |
758 | err("Unknown link state %u/%u\n", l_ptr->state, event); | 764 | pr_err("Unknown link state %u/%u\n", l_ptr->state, event); |
759 | } | 765 | } |
760 | } | 766 | } |
761 | 767 | ||
@@ -856,7 +862,8 @@ int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf) | |||
856 | } | 862 | } |
857 | kfree_skb(buf); | 863 | kfree_skb(buf); |
858 | if (imp > CONN_MANAGER) { | 864 | if (imp > CONN_MANAGER) { |
859 | warn("Resetting link <%s>, send queue full", l_ptr->name); | 865 | pr_warn("%s<%s>, send queue full", link_rst_msg, |
866 | l_ptr->name); | ||
860 | tipc_link_reset(l_ptr); | 867 | tipc_link_reset(l_ptr); |
861 | } | 868 | } |
862 | return dsz; | 869 | return dsz; |
@@ -1409,8 +1416,8 @@ static void link_reset_all(unsigned long addr) | |||
1409 | 1416 | ||
1410 | tipc_node_lock(n_ptr); | 1417 | tipc_node_lock(n_ptr); |
1411 | 1418 | ||
1412 | warn("Resetting all links to %s\n", | 1419 | pr_warn("Resetting all links to %s\n", |
1413 | tipc_addr_string_fill(addr_string, n_ptr->addr)); | 1420 | tipc_addr_string_fill(addr_string, n_ptr->addr)); |
1414 | 1421 | ||
1415 | for (i = 0; i < MAX_BEARERS; i++) { | 1422 | for (i = 0; i < MAX_BEARERS; i++) { |
1416 | if (n_ptr->links[i]) { | 1423 | if (n_ptr->links[i]) { |
@@ -1428,7 +1435,7 @@ static void link_retransmit_failure(struct tipc_link *l_ptr, | |||
1428 | { | 1435 | { |
1429 | struct tipc_msg *msg = buf_msg(buf); | 1436 | struct tipc_msg *msg = buf_msg(buf); |
1430 | 1437 | ||
1431 | warn("Retransmission failure on link <%s>\n", l_ptr->name); | 1438 | pr_warn("Retransmission failure on link <%s>\n", l_ptr->name); |
1432 | 1439 | ||
1433 | if (l_ptr->addr) { | 1440 | if (l_ptr->addr) { |
1434 | /* Handle failure on standard link */ | 1441 | /* Handle failure on standard link */ |
@@ -1440,21 +1447,23 @@ static void link_retransmit_failure(struct tipc_link *l_ptr, | |||
1440 | struct tipc_node *n_ptr; | 1447 | struct tipc_node *n_ptr; |
1441 | char addr_string[16]; | 1448 | char addr_string[16]; |
1442 | 1449 | ||
1443 | info("Msg seq number: %u, ", msg_seqno(msg)); | 1450 | pr_info("Msg seq number: %u, ", msg_seqno(msg)); |
1444 | info("Outstanding acks: %lu\n", | 1451 | pr_cont("Outstanding acks: %lu\n", |
1445 | (unsigned long) TIPC_SKB_CB(buf)->handle); | 1452 | (unsigned long) TIPC_SKB_CB(buf)->handle); |
1446 | 1453 | ||
1447 | n_ptr = tipc_bclink_retransmit_to(); | 1454 | n_ptr = tipc_bclink_retransmit_to(); |
1448 | tipc_node_lock(n_ptr); | 1455 | tipc_node_lock(n_ptr); |
1449 | 1456 | ||
1450 | tipc_addr_string_fill(addr_string, n_ptr->addr); | 1457 | tipc_addr_string_fill(addr_string, n_ptr->addr); |
1451 | info("Broadcast link info for %s\n", addr_string); | 1458 | pr_info("Broadcast link info for %s\n", addr_string); |
1452 | info("Supportable: %d, ", n_ptr->bclink.supportable); | 1459 | pr_info("Supportable: %d, Supported: %d, Acked: %u\n", |
1453 | info("Supported: %d, ", n_ptr->bclink.supported); | 1460 | n_ptr->bclink.supportable, |
1454 | info("Acked: %u\n", n_ptr->bclink.acked); | 1461 | n_ptr->bclink.supported, |
1455 | info("Last in: %u, ", n_ptr->bclink.last_in); | 1462 | n_ptr->bclink.acked); |
1456 | info("Oos state: %u, ", n_ptr->bclink.oos_state); | 1463 | pr_info("Last in: %u, Oos state: %u, Last sent: %u\n", |
1457 | info("Last sent: %u\n", n_ptr->bclink.last_sent); | 1464 | n_ptr->bclink.last_in, |
1465 | n_ptr->bclink.oos_state, | ||
1466 | n_ptr->bclink.last_sent); | ||
1458 | 1467 | ||
1459 | tipc_k_signal((Handler)link_reset_all, (unsigned long)n_ptr->addr); | 1468 | tipc_k_signal((Handler)link_reset_all, (unsigned long)n_ptr->addr); |
1460 | 1469 | ||
@@ -1479,8 +1488,8 @@ void tipc_link_retransmit(struct tipc_link *l_ptr, struct sk_buff *buf, | |||
1479 | l_ptr->retransm_queue_head = msg_seqno(msg); | 1488 | l_ptr->retransm_queue_head = msg_seqno(msg); |
1480 | l_ptr->retransm_queue_size = retransmits; | 1489 | l_ptr->retransm_queue_size = retransmits; |
1481 | } else { | 1490 | } else { |
1482 | err("Unexpected retransmit on link %s (qsize=%d)\n", | 1491 | pr_err("Unexpected retransmit on link %s (qsize=%d)\n", |
1483 | l_ptr->name, l_ptr->retransm_queue_size); | 1492 | l_ptr->name, l_ptr->retransm_queue_size); |
1484 | } | 1493 | } |
1485 | return; | 1494 | return; |
1486 | } else { | 1495 | } else { |
@@ -2074,8 +2083,9 @@ static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf) | |||
2074 | 2083 | ||
2075 | if (msg_linkprio(msg) && | 2084 | if (msg_linkprio(msg) && |
2076 | (msg_linkprio(msg) != l_ptr->priority)) { | 2085 | (msg_linkprio(msg) != l_ptr->priority)) { |
2077 | warn("Resetting link <%s>, priority change %u->%u\n", | 2086 | pr_warn("%s<%s>, priority change %u->%u\n", |
2078 | l_ptr->name, l_ptr->priority, msg_linkprio(msg)); | 2087 | link_rst_msg, l_ptr->name, l_ptr->priority, |
2088 | msg_linkprio(msg)); | ||
2079 | l_ptr->priority = msg_linkprio(msg); | 2089 | l_ptr->priority = msg_linkprio(msg); |
2080 | tipc_link_reset(l_ptr); /* Enforce change to take effect */ | 2090 | tipc_link_reset(l_ptr); /* Enforce change to take effect */ |
2081 | break; | 2091 | break; |
@@ -2139,15 +2149,13 @@ static void tipc_link_tunnel(struct tipc_link *l_ptr, | |||
2139 | 2149 | ||
2140 | tunnel = l_ptr->owner->active_links[selector & 1]; | 2150 | tunnel = l_ptr->owner->active_links[selector & 1]; |
2141 | if (!tipc_link_is_up(tunnel)) { | 2151 | if (!tipc_link_is_up(tunnel)) { |
2142 | warn("Link changeover error, " | 2152 | pr_warn("%stunnel link no longer available\n", link_co_err); |
2143 | "tunnel link no longer available\n"); | ||
2144 | return; | 2153 | return; |
2145 | } | 2154 | } |
2146 | msg_set_size(tunnel_hdr, length + INT_H_SIZE); | 2155 | msg_set_size(tunnel_hdr, length + INT_H_SIZE); |
2147 | buf = tipc_buf_acquire(length + INT_H_SIZE); | 2156 | buf = tipc_buf_acquire(length + INT_H_SIZE); |
2148 | if (!buf) { | 2157 | if (!buf) { |
2149 | warn("Link changeover error, " | 2158 | pr_warn("%sunable to send tunnel msg\n", link_co_err); |
2150 | "unable to send tunnel msg\n"); | ||
2151 | return; | 2159 | return; |
2152 | } | 2160 | } |
2153 | skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE); | 2161 | skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE); |
@@ -2173,8 +2181,7 @@ void tipc_link_changeover(struct tipc_link *l_ptr) | |||
2173 | return; | 2181 | return; |
2174 | 2182 | ||
2175 | if (!l_ptr->owner->permit_changeover) { | 2183 | if (!l_ptr->owner->permit_changeover) { |
2176 | warn("Link changeover error, " | 2184 | pr_warn("%speer did not permit changeover\n", link_co_err); |
2177 | "peer did not permit changeover\n"); | ||
2178 | return; | 2185 | return; |
2179 | } | 2186 | } |
2180 | 2187 | ||
@@ -2192,8 +2199,8 @@ void tipc_link_changeover(struct tipc_link *l_ptr) | |||
2192 | msg_set_size(&tunnel_hdr, INT_H_SIZE); | 2199 | msg_set_size(&tunnel_hdr, INT_H_SIZE); |
2193 | tipc_link_send_buf(tunnel, buf); | 2200 | tipc_link_send_buf(tunnel, buf); |
2194 | } else { | 2201 | } else { |
2195 | warn("Link changeover error, " | 2202 | pr_warn("%sunable to send changeover msg\n", |
2196 | "unable to send changeover msg\n"); | 2203 | link_co_err); |
2197 | } | 2204 | } |
2198 | return; | 2205 | return; |
2199 | } | 2206 | } |
@@ -2246,8 +2253,8 @@ void tipc_link_send_duplicate(struct tipc_link *l_ptr, struct tipc_link *tunnel) | |||
2246 | msg_set_size(&tunnel_hdr, length + INT_H_SIZE); | 2253 | msg_set_size(&tunnel_hdr, length + INT_H_SIZE); |
2247 | outbuf = tipc_buf_acquire(length + INT_H_SIZE); | 2254 | outbuf = tipc_buf_acquire(length + INT_H_SIZE); |
2248 | if (outbuf == NULL) { | 2255 | if (outbuf == NULL) { |
2249 | warn("Link changeover error, " | 2256 | pr_warn("%sunable to send duplicate msg\n", |
2250 | "unable to send duplicate msg\n"); | 2257 | link_co_err); |
2251 | return; | 2258 | return; |
2252 | } | 2259 | } |
2253 | skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE); | 2260 | skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE); |
@@ -2298,8 +2305,8 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
2298 | if (!dest_link) | 2305 | if (!dest_link) |
2299 | goto exit; | 2306 | goto exit; |
2300 | if (dest_link == *l_ptr) { | 2307 | if (dest_link == *l_ptr) { |
2301 | err("Unexpected changeover message on link <%s>\n", | 2308 | pr_err("Unexpected changeover message on link <%s>\n", |
2302 | (*l_ptr)->name); | 2309 | (*l_ptr)->name); |
2303 | goto exit; | 2310 | goto exit; |
2304 | } | 2311 | } |
2305 | *l_ptr = dest_link; | 2312 | *l_ptr = dest_link; |
@@ -2310,7 +2317,7 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
2310 | goto exit; | 2317 | goto exit; |
2311 | *buf = buf_extract(tunnel_buf, INT_H_SIZE); | 2318 | *buf = buf_extract(tunnel_buf, INT_H_SIZE); |
2312 | if (*buf == NULL) { | 2319 | if (*buf == NULL) { |
2313 | warn("Link changeover error, duplicate msg dropped\n"); | 2320 | pr_warn("%sduplicate msg dropped\n", link_co_err); |
2314 | goto exit; | 2321 | goto exit; |
2315 | } | 2322 | } |
2316 | kfree_skb(tunnel_buf); | 2323 | kfree_skb(tunnel_buf); |
@@ -2319,8 +2326,8 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
2319 | 2326 | ||
2320 | /* First original message ?: */ | 2327 | /* First original message ?: */ |
2321 | if (tipc_link_is_up(dest_link)) { | 2328 | if (tipc_link_is_up(dest_link)) { |
2322 | info("Resetting link <%s>, changeover initiated by peer\n", | 2329 | pr_info("%s<%s>, changeover initiated by peer\n", link_rst_msg, |
2323 | dest_link->name); | 2330 | dest_link->name); |
2324 | tipc_link_reset(dest_link); | 2331 | tipc_link_reset(dest_link); |
2325 | dest_link->exp_msg_count = msg_count; | 2332 | dest_link->exp_msg_count = msg_count; |
2326 | if (!msg_count) | 2333 | if (!msg_count) |
@@ -2333,8 +2340,7 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
2333 | 2340 | ||
2334 | /* Receive original message */ | 2341 | /* Receive original message */ |
2335 | if (dest_link->exp_msg_count == 0) { | 2342 | if (dest_link->exp_msg_count == 0) { |
2336 | warn("Link switchover error, " | 2343 | pr_warn("%sgot too many tunnelled messages\n", link_co_err); |
2337 | "got too many tunnelled messages\n"); | ||
2338 | goto exit; | 2344 | goto exit; |
2339 | } | 2345 | } |
2340 | dest_link->exp_msg_count--; | 2346 | dest_link->exp_msg_count--; |
@@ -2346,7 +2352,7 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
2346 | kfree_skb(tunnel_buf); | 2352 | kfree_skb(tunnel_buf); |
2347 | return 1; | 2353 | return 1; |
2348 | } else { | 2354 | } else { |
2349 | warn("Link changeover error, original msg dropped\n"); | 2355 | pr_warn("%soriginal msg dropped\n", link_co_err); |
2350 | } | 2356 | } |
2351 | } | 2357 | } |
2352 | exit: | 2358 | exit: |
@@ -2367,7 +2373,7 @@ void tipc_link_recv_bundle(struct sk_buff *buf) | |||
2367 | while (msgcount--) { | 2373 | while (msgcount--) { |
2368 | obuf = buf_extract(buf, pos); | 2374 | obuf = buf_extract(buf, pos); |
2369 | if (obuf == NULL) { | 2375 | if (obuf == NULL) { |
2370 | warn("Link unable to unbundle message(s)\n"); | 2376 | pr_warn("Link unable to unbundle message(s)\n"); |
2371 | break; | 2377 | break; |
2372 | } | 2378 | } |
2373 | pos += align(msg_size(buf_msg(obuf))); | 2379 | pos += align(msg_size(buf_msg(obuf))); |
@@ -2538,7 +2544,7 @@ int tipc_link_recv_fragment(struct sk_buff **pending, struct sk_buff **fb, | |||
2538 | set_fragm_size(pbuf, fragm_sz); | 2544 | set_fragm_size(pbuf, fragm_sz); |
2539 | set_expected_frags(pbuf, exp_fragm_cnt - 1); | 2545 | set_expected_frags(pbuf, exp_fragm_cnt - 1); |
2540 | } else { | 2546 | } else { |
2541 | dbg("Link unable to reassemble fragmented message\n"); | 2547 | pr_debug("Link unable to reassemble fragmented message\n"); |
2542 | kfree_skb(fbuf); | 2548 | kfree_skb(fbuf); |
2543 | return -1; | 2549 | return -1; |
2544 | } | 2550 | } |
@@ -3060,5 +3066,5 @@ print_state: | |||
3060 | tipc_printf(buf, "\n"); | 3066 | tipc_printf(buf, "\n"); |
3061 | 3067 | ||
3062 | tipc_printbuf_validate(buf); | 3068 | tipc_printbuf_validate(buf); |
3063 | info("%s", print_area); | 3069 | pr_info("%s", print_area); |
3064 | } | 3070 | } |
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index 158318e67b08..55d3928dfd67 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c | |||
@@ -161,7 +161,7 @@ void tipc_named_publish(struct publication *publ) | |||
161 | 161 | ||
162 | buf = named_prepare_buf(PUBLICATION, ITEM_SIZE, 0); | 162 | buf = named_prepare_buf(PUBLICATION, ITEM_SIZE, 0); |
163 | if (!buf) { | 163 | if (!buf) { |
164 | warn("Publication distribution failure\n"); | 164 | pr_warn("Publication distribution failure\n"); |
165 | return; | 165 | return; |
166 | } | 166 | } |
167 | 167 | ||
@@ -186,7 +186,7 @@ void tipc_named_withdraw(struct publication *publ) | |||
186 | 186 | ||
187 | buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0); | 187 | buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0); |
188 | if (!buf) { | 188 | if (!buf) { |
189 | warn("Withdrawal distribution failure\n"); | 189 | pr_warn("Withdrawal distribution failure\n"); |
190 | return; | 190 | return; |
191 | } | 191 | } |
192 | 192 | ||
@@ -213,7 +213,7 @@ static void named_distribute(struct list_head *message_list, u32 node, | |||
213 | rest -= left; | 213 | rest -= left; |
214 | buf = named_prepare_buf(PUBLICATION, left, node); | 214 | buf = named_prepare_buf(PUBLICATION, left, node); |
215 | if (!buf) { | 215 | if (!buf) { |
216 | warn("Bulk publication failure\n"); | 216 | pr_warn("Bulk publication failure\n"); |
217 | return; | 217 | return; |
218 | } | 218 | } |
219 | item = (struct distr_item *)msg_data(buf_msg(buf)); | 219 | item = (struct distr_item *)msg_data(buf_msg(buf)); |
@@ -283,9 +283,10 @@ static void named_purge_publ(struct publication *publ) | |||
283 | write_unlock_bh(&tipc_nametbl_lock); | 283 | write_unlock_bh(&tipc_nametbl_lock); |
284 | 284 | ||
285 | if (p != publ) { | 285 | if (p != publ) { |
286 | err("Unable to remove publication from failed node\n" | 286 | pr_err("Unable to remove publication from failed node\n" |
287 | "(type=%u, lower=%u, node=0x%x, ref=%u, key=%u)\n", | 287 | " (type=%u, lower=%u, node=0x%x, ref=%u, key=%u)\n", |
288 | publ->type, publ->lower, publ->node, publ->ref, publ->key); | 288 | publ->type, publ->lower, publ->node, publ->ref, |
289 | publ->key); | ||
289 | } | 290 | } |
290 | 291 | ||
291 | kfree(p); | 292 | kfree(p); |
@@ -329,14 +330,14 @@ void tipc_named_recv(struct sk_buff *buf) | |||
329 | tipc_nodesub_unsubscribe(&publ->subscr); | 330 | tipc_nodesub_unsubscribe(&publ->subscr); |
330 | kfree(publ); | 331 | kfree(publ); |
331 | } else { | 332 | } else { |
332 | err("Unable to remove publication by node 0x%x\n" | 333 | pr_err("Unable to remove publication by node 0x%x\n" |
333 | "(type=%u, lower=%u, ref=%u, key=%u)\n", | 334 | " (type=%u, lower=%u, ref=%u, key=%u)\n", |
334 | msg_orignode(msg), | 335 | msg_orignode(msg), ntohl(item->type), |
335 | ntohl(item->type), ntohl(item->lower), | 336 | ntohl(item->lower), ntohl(item->ref), |
336 | ntohl(item->ref), ntohl(item->key)); | 337 | ntohl(item->key)); |
337 | } | 338 | } |
338 | } else { | 339 | } else { |
339 | warn("Unrecognized name table message received\n"); | 340 | pr_warn("Unrecognized name table message received\n"); |
340 | } | 341 | } |
341 | item++; | 342 | item++; |
342 | } | 343 | } |
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index cade0acda4ef..c8b0b5c3c56e 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -126,7 +126,7 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper, | |||
126 | { | 126 | { |
127 | struct publication *publ = kzalloc(sizeof(*publ), GFP_ATOMIC); | 127 | struct publication *publ = kzalloc(sizeof(*publ), GFP_ATOMIC); |
128 | if (publ == NULL) { | 128 | if (publ == NULL) { |
129 | warn("Publication creation failure, no memory\n"); | 129 | pr_warn("Publication creation failure, no memory\n"); |
130 | return NULL; | 130 | return NULL; |
131 | } | 131 | } |
132 | 132 | ||
@@ -163,7 +163,7 @@ static struct name_seq *tipc_nameseq_create(u32 type, struct hlist_head *seq_hea | |||
163 | struct sub_seq *sseq = tipc_subseq_alloc(1); | 163 | struct sub_seq *sseq = tipc_subseq_alloc(1); |
164 | 164 | ||
165 | if (!nseq || !sseq) { | 165 | if (!nseq || !sseq) { |
166 | warn("Name sequence creation failed, no memory\n"); | 166 | pr_warn("Name sequence creation failed, no memory\n"); |
167 | kfree(nseq); | 167 | kfree(nseq); |
168 | kfree(sseq); | 168 | kfree(sseq); |
169 | return NULL; | 169 | return NULL; |
@@ -263,8 +263,8 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, | |||
263 | 263 | ||
264 | /* Lower end overlaps existing entry => need an exact match */ | 264 | /* Lower end overlaps existing entry => need an exact match */ |
265 | if ((sseq->lower != lower) || (sseq->upper != upper)) { | 265 | if ((sseq->lower != lower) || (sseq->upper != upper)) { |
266 | warn("Cannot publish {%u,%u,%u}, overlap error\n", | 266 | pr_warn("Cannot publish {%u,%u,%u}, overlap error\n", |
267 | type, lower, upper); | 267 | type, lower, upper); |
268 | return NULL; | 268 | return NULL; |
269 | } | 269 | } |
270 | 270 | ||
@@ -286,8 +286,8 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, | |||
286 | /* Fail if upper end overlaps into an existing entry */ | 286 | /* Fail if upper end overlaps into an existing entry */ |
287 | if ((inspos < nseq->first_free) && | 287 | if ((inspos < nseq->first_free) && |
288 | (upper >= nseq->sseqs[inspos].lower)) { | 288 | (upper >= nseq->sseqs[inspos].lower)) { |
289 | warn("Cannot publish {%u,%u,%u}, overlap error\n", | 289 | pr_warn("Cannot publish {%u,%u,%u}, overlap error\n", |
290 | type, lower, upper); | 290 | type, lower, upper); |
291 | return NULL; | 291 | return NULL; |
292 | } | 292 | } |
293 | 293 | ||
@@ -296,8 +296,8 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, | |||
296 | struct sub_seq *sseqs = tipc_subseq_alloc(nseq->alloc * 2); | 296 | struct sub_seq *sseqs = tipc_subseq_alloc(nseq->alloc * 2); |
297 | 297 | ||
298 | if (!sseqs) { | 298 | if (!sseqs) { |
299 | warn("Cannot publish {%u,%u,%u}, no memory\n", | 299 | pr_warn("Cannot publish {%u,%u,%u}, no memory\n", |
300 | type, lower, upper); | 300 | type, lower, upper); |
301 | return NULL; | 301 | return NULL; |
302 | } | 302 | } |
303 | memcpy(sseqs, nseq->sseqs, | 303 | memcpy(sseqs, nseq->sseqs, |
@@ -309,8 +309,8 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, | |||
309 | 309 | ||
310 | info = kzalloc(sizeof(*info), GFP_ATOMIC); | 310 | info = kzalloc(sizeof(*info), GFP_ATOMIC); |
311 | if (!info) { | 311 | if (!info) { |
312 | warn("Cannot publish {%u,%u,%u}, no memory\n", | 312 | pr_warn("Cannot publish {%u,%u,%u}, no memory\n", |
313 | type, lower, upper); | 313 | type, lower, upper); |
314 | return NULL; | 314 | return NULL; |
315 | } | 315 | } |
316 | 316 | ||
@@ -492,8 +492,8 @@ struct publication *tipc_nametbl_insert_publ(u32 type, u32 lower, u32 upper, | |||
492 | 492 | ||
493 | if ((scope < TIPC_ZONE_SCOPE) || (scope > TIPC_NODE_SCOPE) || | 493 | if ((scope < TIPC_ZONE_SCOPE) || (scope > TIPC_NODE_SCOPE) || |
494 | (lower > upper)) { | 494 | (lower > upper)) { |
495 | dbg("Failed to publish illegal {%u,%u,%u} with scope %u\n", | 495 | pr_debug("Failed to publish illegal {%u,%u,%u} with scope %u\n", |
496 | type, lower, upper, scope); | 496 | type, lower, upper, scope); |
497 | return NULL; | 497 | return NULL; |
498 | } | 498 | } |
499 | 499 | ||
@@ -668,8 +668,8 @@ struct publication *tipc_nametbl_publish(u32 type, u32 lower, u32 upper, | |||
668 | struct publication *publ; | 668 | struct publication *publ; |
669 | 669 | ||
670 | if (table.local_publ_count >= tipc_max_publications) { | 670 | if (table.local_publ_count >= tipc_max_publications) { |
671 | warn("Publication failed, local publication limit reached (%u)\n", | 671 | pr_warn("Publication failed, local publication limit reached (%u)\n", |
672 | tipc_max_publications); | 672 | tipc_max_publications); |
673 | return NULL; | 673 | return NULL; |
674 | } | 674 | } |
675 | 675 | ||
@@ -702,9 +702,9 @@ int tipc_nametbl_withdraw(u32 type, u32 lower, u32 ref, u32 key) | |||
702 | return 1; | 702 | return 1; |
703 | } | 703 | } |
704 | write_unlock_bh(&tipc_nametbl_lock); | 704 | write_unlock_bh(&tipc_nametbl_lock); |
705 | err("Unable to remove local publication\n" | 705 | pr_err("Unable to remove local publication\n" |
706 | "(type=%u, lower=%u, ref=%u, key=%u)\n", | 706 | "(type=%u, lower=%u, ref=%u, key=%u)\n", |
707 | type, lower, ref, key); | 707 | type, lower, ref, key); |
708 | return 0; | 708 | return 0; |
709 | } | 709 | } |
710 | 710 | ||
@@ -725,8 +725,8 @@ void tipc_nametbl_subscribe(struct tipc_subscription *s) | |||
725 | tipc_nameseq_subscribe(seq, s); | 725 | tipc_nameseq_subscribe(seq, s); |
726 | spin_unlock_bh(&seq->lock); | 726 | spin_unlock_bh(&seq->lock); |
727 | } else { | 727 | } else { |
728 | warn("Failed to create subscription for {%u,%u,%u}\n", | 728 | pr_warn("Failed to create subscription for {%u,%u,%u}\n", |
729 | s->seq.type, s->seq.lower, s->seq.upper); | 729 | s->seq.type, s->seq.lower, s->seq.upper); |
730 | } | 730 | } |
731 | write_unlock_bh(&tipc_nametbl_lock); | 731 | write_unlock_bh(&tipc_nametbl_lock); |
732 | } | 732 | } |
@@ -942,7 +942,7 @@ void tipc_nametbl_stop(void) | |||
942 | for (i = 0; i < tipc_nametbl_size; i++) { | 942 | for (i = 0; i < tipc_nametbl_size; i++) { |
943 | if (hlist_empty(&table.types[i])) | 943 | if (hlist_empty(&table.types[i])) |
944 | continue; | 944 | continue; |
945 | err("tipc_nametbl_stop(): orphaned hash chain detected\n"); | 945 | pr_err("nametbl_stop(): orphaned hash chain detected\n"); |
946 | break; | 946 | break; |
947 | } | 947 | } |
948 | kfree(table.types); | 948 | kfree(table.types); |
diff --git a/net/tipc/net.c b/net/tipc/net.c index 7c236c89cf5e..5b5cea259caf 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -184,9 +184,9 @@ int tipc_net_start(u32 addr) | |||
184 | 184 | ||
185 | tipc_cfg_reinit(); | 185 | tipc_cfg_reinit(); |
186 | 186 | ||
187 | info("Started in network mode\n"); | 187 | pr_info("Started in network mode\n"); |
188 | info("Own node address %s, network identity %u\n", | 188 | pr_info("Own node address %s, network identity %u\n", |
189 | tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); | 189 | tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); |
190 | return 0; | 190 | return 0; |
191 | } | 191 | } |
192 | 192 | ||
@@ -202,5 +202,5 @@ void tipc_net_stop(void) | |||
202 | list_for_each_entry_safe(node, t_node, &tipc_node_list, list) | 202 | list_for_each_entry_safe(node, t_node, &tipc_node_list, list) |
203 | tipc_node_delete(node); | 203 | tipc_node_delete(node); |
204 | write_unlock_bh(&tipc_net_lock); | 204 | write_unlock_bh(&tipc_net_lock); |
205 | info("Left network mode\n"); | 205 | pr_info("Left network mode\n"); |
206 | } | 206 | } |
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index 7bda8e3d1398..47a839df27dc 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c | |||
@@ -90,7 +90,7 @@ int tipc_netlink_start(void) | |||
90 | res = genl_register_family_with_ops(&tipc_genl_family, | 90 | res = genl_register_family_with_ops(&tipc_genl_family, |
91 | &tipc_genl_ops, 1); | 91 | &tipc_genl_ops, 1); |
92 | if (res) { | 92 | if (res) { |
93 | err("Failed to register netlink interface\n"); | 93 | pr_err("Failed to register netlink interface\n"); |
94 | return res; | 94 | return res; |
95 | } | 95 | } |
96 | 96 | ||
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) { |
diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index 7a27344108fe..5e34b015da45 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c | |||
@@ -51,7 +51,8 @@ void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, | |||
51 | 51 | ||
52 | node_sub->node = tipc_node_find(addr); | 52 | node_sub->node = tipc_node_find(addr); |
53 | if (!node_sub->node) { | 53 | if (!node_sub->node) { |
54 | warn("Node subscription rejected, unknown node 0x%x\n", addr); | 54 | pr_warn("Node subscription rejected, unknown node 0x%x\n", |
55 | addr); | ||
55 | return; | 56 | return; |
56 | } | 57 | } |
57 | node_sub->handle_node_down = handle_down; | 58 | node_sub->handle_node_down = handle_down; |
diff --git a/net/tipc/port.c b/net/tipc/port.c index 70bf78bd5b75..2cbac3956fc9 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -191,7 +191,7 @@ void tipc_port_recv_mcast(struct sk_buff *buf, struct tipc_port_list *dp) | |||
191 | struct sk_buff *b = skb_clone(buf, GFP_ATOMIC); | 191 | struct sk_buff *b = skb_clone(buf, GFP_ATOMIC); |
192 | 192 | ||
193 | if (b == NULL) { | 193 | if (b == NULL) { |
194 | warn("Unable to deliver multicast message(s)\n"); | 194 | pr_warn("Unable to deliver multicast message(s)\n"); |
195 | goto exit; | 195 | goto exit; |
196 | } | 196 | } |
197 | if ((index == 0) && (cnt != 0)) | 197 | if ((index == 0) && (cnt != 0)) |
@@ -221,12 +221,12 @@ struct tipc_port *tipc_createport_raw(void *usr_handle, | |||
221 | 221 | ||
222 | p_ptr = kzalloc(sizeof(*p_ptr), GFP_ATOMIC); | 222 | p_ptr = kzalloc(sizeof(*p_ptr), GFP_ATOMIC); |
223 | if (!p_ptr) { | 223 | if (!p_ptr) { |
224 | warn("Port creation failed, no memory\n"); | 224 | pr_warn("Port creation failed, no memory\n"); |
225 | return NULL; | 225 | return NULL; |
226 | } | 226 | } |
227 | ref = tipc_ref_acquire(p_ptr, &p_ptr->lock); | 227 | ref = tipc_ref_acquire(p_ptr, &p_ptr->lock); |
228 | if (!ref) { | 228 | if (!ref) { |
229 | warn("Port creation failed, reference table exhausted\n"); | 229 | pr_warn("Port creation failed, ref. table exhausted\n"); |
230 | kfree(p_ptr); | 230 | kfree(p_ptr); |
231 | return NULL; | 231 | return NULL; |
232 | } | 232 | } |
@@ -906,7 +906,7 @@ int tipc_createport(void *usr_handle, | |||
906 | 906 | ||
907 | up_ptr = kmalloc(sizeof(*up_ptr), GFP_ATOMIC); | 907 | up_ptr = kmalloc(sizeof(*up_ptr), GFP_ATOMIC); |
908 | if (!up_ptr) { | 908 | if (!up_ptr) { |
909 | warn("Port creation failed, no memory\n"); | 909 | pr_warn("Port creation failed, no memory\n"); |
910 | return -ENOMEM; | 910 | return -ENOMEM; |
911 | } | 911 | } |
912 | p_ptr = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, | 912 | p_ptr = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, |
diff --git a/net/tipc/ref.c b/net/tipc/ref.c index 5cada0e38e03..2a2a938dc22c 100644 --- a/net/tipc/ref.c +++ b/net/tipc/ref.c | |||
@@ -153,11 +153,11 @@ u32 tipc_ref_acquire(void *object, spinlock_t **lock) | |||
153 | struct reference *entry = NULL; | 153 | struct reference *entry = NULL; |
154 | 154 | ||
155 | if (!object) { | 155 | if (!object) { |
156 | err("Attempt to acquire reference to non-existent object\n"); | 156 | pr_err("Attempt to acquire ref. to non-existent obj\n"); |
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
159 | if (!tipc_ref_table.entries) { | 159 | if (!tipc_ref_table.entries) { |
160 | err("Reference table not found during acquisition attempt\n"); | 160 | pr_err("Ref. table not found in acquisition attempt\n"); |
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
@@ -211,7 +211,7 @@ void tipc_ref_discard(u32 ref) | |||
211 | u32 index_mask; | 211 | u32 index_mask; |
212 | 212 | ||
213 | if (!tipc_ref_table.entries) { | 213 | if (!tipc_ref_table.entries) { |
214 | err("Reference table not found during discard attempt\n"); | 214 | pr_err("Ref. table not found during discard attempt\n"); |
215 | return; | 215 | return; |
216 | } | 216 | } |
217 | 217 | ||
@@ -222,11 +222,11 @@ void tipc_ref_discard(u32 ref) | |||
222 | write_lock_bh(&ref_table_lock); | 222 | write_lock_bh(&ref_table_lock); |
223 | 223 | ||
224 | if (!entry->object) { | 224 | if (!entry->object) { |
225 | err("Attempt to discard reference to non-existent object\n"); | 225 | pr_err("Attempt to discard ref. to non-existent obj\n"); |
226 | goto exit; | 226 | goto exit; |
227 | } | 227 | } |
228 | if (entry->ref != ref) { | 228 | if (entry->ref != ref) { |
229 | err("Attempt to discard non-existent reference\n"); | 229 | pr_err("Attempt to discard non-existent reference\n"); |
230 | goto exit; | 230 | goto exit; |
231 | } | 231 | } |
232 | 232 | ||
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 1ebb49f3ddbe..09dc5b97e079 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -34,12 +34,12 @@ | |||
34 | * POSSIBILITY OF SUCH DAMAGE. | 34 | * POSSIBILITY OF SUCH DAMAGE. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/export.h> | ||
38 | #include <net/sock.h> | ||
39 | |||
40 | #include "core.h" | 37 | #include "core.h" |
41 | #include "port.h" | 38 | #include "port.h" |
42 | 39 | ||
40 | #include <linux/export.h> | ||
41 | #include <net/sock.h> | ||
42 | |||
43 | #define SS_LISTENING -1 /* socket is listening */ | 43 | #define SS_LISTENING -1 /* socket is listening */ |
44 | #define SS_READY -2 /* socket is connectionless */ | 44 | #define SS_READY -2 /* socket is connectionless */ |
45 | 45 | ||
@@ -1787,13 +1787,13 @@ int tipc_socket_init(void) | |||
1787 | 1787 | ||
1788 | res = proto_register(&tipc_proto, 1); | 1788 | res = proto_register(&tipc_proto, 1); |
1789 | if (res) { | 1789 | if (res) { |
1790 | err("Failed to register TIPC protocol type\n"); | 1790 | pr_err("Failed to register TIPC protocol type\n"); |
1791 | goto out; | 1791 | goto out; |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | res = sock_register(&tipc_family_ops); | 1794 | res = sock_register(&tipc_family_ops); |
1795 | if (res) { | 1795 | if (res) { |
1796 | err("Failed to register TIPC socket type\n"); | 1796 | pr_err("Failed to register TIPC socket type\n"); |
1797 | proto_unregister(&tipc_proto); | 1797 | proto_unregister(&tipc_proto); |
1798 | goto out; | 1798 | goto out; |
1799 | } | 1799 | } |
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 | ||
519 | failed: | 519 | failed: |
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 | ||