diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2010-05-11 10:30:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-13 02:02:25 -0400 |
commit | c68ca7b72017f8f52e7aed0d2a6ecfaede133b6b (patch) | |
tree | 37e428def9c1720122282efa23d18834f8060795 /net/tipc | |
parent | 01fee256a675f6492fc6945bbb9b59640d8705d4 (diff) |
tipc: add tipc_ prefix to fcns targeted for un-inlining
These functions have enough code in them such that they
seem like sensible targets for un-inlining. Prior to doing
that, this adds the tipc_ prefix to the functions, so that
in the event of a panic dump or similar, the subsystem from
which the functions come from is immediately clear.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/addr.h | 8 | ||||
-rw-r--r-- | net/tipc/bcast.c | 2 | ||||
-rw-r--r-- | net/tipc/bcast.h | 12 | ||||
-rw-r--r-- | net/tipc/bearer.c | 4 | ||||
-rw-r--r-- | net/tipc/cluster.c | 2 | ||||
-rw-r--r-- | net/tipc/discover.c | 6 | ||||
-rw-r--r-- | net/tipc/link.c | 20 | ||||
-rw-r--r-- | net/tipc/msg.h | 14 | ||||
-rw-r--r-- | net/tipc/name_distr.c | 2 | ||||
-rw-r--r-- | net/tipc/name_table.c | 2 | ||||
-rw-r--r-- | net/tipc/net.c | 4 | ||||
-rw-r--r-- | net/tipc/node.c | 12 | ||||
-rw-r--r-- | net/tipc/port.c | 22 |
13 files changed, 55 insertions, 55 deletions
diff --git a/net/tipc/addr.h b/net/tipc/addr.h index 3ba67e6ce03e..4d4aee0e4232 100644 --- a/net/tipc/addr.h +++ b/net/tipc/addr.h | |||
@@ -67,7 +67,7 @@ static inline int may_route(u32 addr) | |||
67 | return(addr ^ tipc_own_addr) >> 11; | 67 | return(addr ^ tipc_own_addr) >> 11; |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline int in_scope(u32 domain, u32 addr) | 70 | static inline int tipc_in_scope(u32 domain, u32 addr) |
71 | { | 71 | { |
72 | if (!domain || (domain == addr)) | 72 | if (!domain || (domain == addr)) |
73 | return 1; | 73 | return 1; |
@@ -79,10 +79,10 @@ static inline int in_scope(u32 domain, u32 addr) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * addr_scope - convert message lookup domain to equivalent 2-bit scope value | 82 | * tipc_addr_scope - convert message lookup domain to a 2-bit scope value |
83 | */ | 83 | */ |
84 | 84 | ||
85 | static inline int addr_scope(u32 domain) | 85 | static inline int tipc_addr_scope(u32 domain) |
86 | { | 86 | { |
87 | if (likely(!domain)) | 87 | if (likely(!domain)) |
88 | return TIPC_ZONE_SCOPE; | 88 | return TIPC_ZONE_SCOPE; |
@@ -110,7 +110,7 @@ static inline int addr_domain(int sc) | |||
110 | return tipc_addr(tipc_zone(tipc_own_addr), 0, 0); | 110 | return tipc_addr(tipc_zone(tipc_own_addr), 0, 0); |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline char *addr_string_fill(char *string, u32 addr) | 113 | static inline char *tipc_addr_string_fill(char *string, u32 addr) |
114 | { | 114 | { |
115 | snprintf(string, 16, "<%u.%u.%u>", | 115 | snprintf(string, 16, "<%u.%u.%u>", |
116 | tipc_zone(addr), tipc_cluster(addr), tipc_node(addr)); | 116 | tipc_zone(addr), tipc_cluster(addr), tipc_node(addr)); |
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index a18f26deb659..a8f22e78c3f3 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -275,7 +275,7 @@ static void bclink_send_nack(struct tipc_node *n_ptr) | |||
275 | buf = buf_acquire(INT_H_SIZE); | 275 | buf = buf_acquire(INT_H_SIZE); |
276 | if (buf) { | 276 | if (buf) { |
277 | msg = buf_msg(buf); | 277 | msg = buf_msg(buf); |
278 | msg_init(msg, BCAST_PROTOCOL, STATE_MSG, | 278 | tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG, |
279 | INT_H_SIZE, n_ptr->addr); | 279 | INT_H_SIZE, n_ptr->addr); |
280 | msg_set_mc_netid(msg, tipc_net_id); | 280 | msg_set_mc_netid(msg, tipc_net_id); |
281 | msg_set_bcast_ack(msg, mod(n_ptr->bclink.last_in)); | 281 | msg_set_bcast_ack(msg, mod(n_ptr->bclink.last_in)); |
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h index 4c1771e95c99..2b1c4a755dfa 100644 --- a/net/tipc/bcast.h +++ b/net/tipc/bcast.h | |||
@@ -74,7 +74,7 @@ extern const char tipc_bclink_name[]; | |||
74 | 74 | ||
75 | 75 | ||
76 | /** | 76 | /** |
77 | * nmap_add - add a node to a node map | 77 | * tipc_nmap_add - add a node to a node map |
78 | */ | 78 | */ |
79 | 79 | ||
80 | static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node) | 80 | static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node) |
@@ -90,7 +90,7 @@ static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * nmap_remove - remove a node from a node map | 93 | * tipc_nmap_remove - remove a node from a node map |
94 | */ | 94 | */ |
95 | 95 | ||
96 | static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node) | 96 | static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node) |
@@ -106,7 +106,7 @@ static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * nmap_equal - test for equality of node maps | 109 | * tipc_nmap_equal - test for equality of node maps |
110 | */ | 110 | */ |
111 | 111 | ||
112 | static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b) | 112 | static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b) |
@@ -115,7 +115,7 @@ static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_m | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * nmap_diff - find differences between node maps | 118 | * tipc_nmap_diff - find differences between node maps |
119 | * @nm_a: input node map A | 119 | * @nm_a: input node map A |
120 | * @nm_b: input node map B | 120 | * @nm_b: input node map B |
121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) | 121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) |
@@ -143,7 +143,7 @@ static inline void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_m | |||
143 | } | 143 | } |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * port_list_add - add a port to a port list, ensuring no duplicates | 146 | * tipc_port_list_add - add a port to a port list, ensuring no duplicates |
147 | */ | 147 | */ |
148 | 148 | ||
149 | static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port) | 149 | static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port) |
@@ -176,7 +176,7 @@ static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | /** | 178 | /** |
179 | * port_list_free - free dynamically created entries in port_list chain | 179 | * tipc_port_list_free - free dynamically created entries in port_list chain |
180 | * | 180 | * |
181 | * Note: First item is on stack, so it doesn't need to be released | 181 | * Note: First item is on stack, so it doesn't need to be released |
182 | */ | 182 | */ |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 78091375ca12..ccec12f0ccc9 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -493,7 +493,7 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority) | |||
493 | return -EINVAL; | 493 | return -EINVAL; |
494 | } | 494 | } |
495 | if (!tipc_addr_domain_valid(bcast_scope) || | 495 | if (!tipc_addr_domain_valid(bcast_scope) || |
496 | !in_scope(bcast_scope, tipc_own_addr)) { | 496 | !tipc_in_scope(bcast_scope, tipc_own_addr)) { |
497 | warn("Bearer <%s> rejected, illegal broadcast scope\n", name); | 497 | warn("Bearer <%s> rejected, illegal broadcast scope\n", name); |
498 | return -EINVAL; | 498 | return -EINVAL; |
499 | } | 499 | } |
@@ -571,7 +571,7 @@ restart: | |||
571 | spin_lock_init(&b_ptr->publ.lock); | 571 | spin_lock_init(&b_ptr->publ.lock); |
572 | write_unlock_bh(&tipc_net_lock); | 572 | write_unlock_bh(&tipc_net_lock); |
573 | info("Enabled bearer <%s>, discovery domain %s, priority %u\n", | 573 | info("Enabled bearer <%s>, discovery domain %s, priority %u\n", |
574 | name, addr_string_fill(addr_string, bcast_scope), priority); | 574 | name, tipc_addr_string_fill(addr_string, bcast_scope), priority); |
575 | return 0; | 575 | return 0; |
576 | failed: | 576 | failed: |
577 | write_unlock_bh(&tipc_net_lock); | 577 | write_unlock_bh(&tipc_net_lock); |
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index a7eac00cd363..e68f705381bc 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c | |||
@@ -238,7 +238,7 @@ static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest) | |||
238 | if (buf) { | 238 | if (buf) { |
239 | msg = buf_msg(buf); | 239 | msg = buf_msg(buf); |
240 | memset((char *)msg, 0, size); | 240 | memset((char *)msg, 0, size); |
241 | msg_init(msg, ROUTE_DISTRIBUTOR, 0, INT_H_SIZE, dest); | 241 | tipc_msg_init(msg, ROUTE_DISTRIBUTOR, 0, INT_H_SIZE, dest); |
242 | } | 242 | } |
243 | return buf; | 243 | return buf; |
244 | } | 244 | } |
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index ce1390a0cd00..fc1fcf5e6b53 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -120,7 +120,7 @@ static struct sk_buff *tipc_disc_init_msg(u32 type, | |||
120 | 120 | ||
121 | if (buf) { | 121 | if (buf) { |
122 | msg = buf_msg(buf); | 122 | msg = buf_msg(buf); |
123 | msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain); | 123 | tipc_msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain); |
124 | msg_set_non_seq(msg, 1); | 124 | msg_set_non_seq(msg, 1); |
125 | msg_set_req_links(msg, req_links); | 125 | msg_set_req_links(msg, req_links); |
126 | msg_set_dest_domain(msg, dest_domain); | 126 | msg_set_dest_domain(msg, dest_domain); |
@@ -144,7 +144,7 @@ static void disc_dupl_alert(struct bearer *b_ptr, u32 node_addr, | |||
144 | char media_addr_str[64]; | 144 | char media_addr_str[64]; |
145 | struct print_buf pb; | 145 | struct print_buf pb; |
146 | 146 | ||
147 | addr_string_fill(node_addr_str, node_addr); | 147 | tipc_addr_string_fill(node_addr_str, node_addr); |
148 | tipc_printbuf_init(&pb, media_addr_str, sizeof(media_addr_str)); | 148 | tipc_printbuf_init(&pb, media_addr_str, sizeof(media_addr_str)); |
149 | tipc_media_addr_printf(&pb, media_addr); | 149 | tipc_media_addr_printf(&pb, media_addr); |
150 | tipc_printbuf_validate(&pb); | 150 | tipc_printbuf_validate(&pb); |
@@ -183,7 +183,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr) | |||
183 | disc_dupl_alert(b_ptr, tipc_own_addr, &media_addr); | 183 | disc_dupl_alert(b_ptr, tipc_own_addr, &media_addr); |
184 | return; | 184 | return; |
185 | } | 185 | } |
186 | if (!in_scope(dest, tipc_own_addr)) | 186 | if (!tipc_in_scope(dest, tipc_own_addr)) |
187 | return; | 187 | return; |
188 | if (is_slave(tipc_own_addr) && is_slave(orig)) | 188 | if (is_slave(tipc_own_addr) && is_slave(orig)) |
189 | return; | 189 | return; |
diff --git a/net/tipc/link.c b/net/tipc/link.c index e8320bf78d5a..a3616b99529b 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -433,7 +433,7 @@ struct link *tipc_link_create(struct bearer *b_ptr, const u32 peer, | |||
433 | 433 | ||
434 | l_ptr->pmsg = (struct tipc_msg *)&l_ptr->proto_msg; | 434 | l_ptr->pmsg = (struct tipc_msg *)&l_ptr->proto_msg; |
435 | msg = l_ptr->pmsg; | 435 | msg = l_ptr->pmsg; |
436 | msg_init(msg, LINK_PROTOCOL, RESET_MSG, INT_H_SIZE, l_ptr->addr); | 436 | tipc_msg_init(msg, LINK_PROTOCOL, RESET_MSG, INT_H_SIZE, l_ptr->addr); |
437 | msg_set_size(msg, sizeof(l_ptr->proto_msg)); | 437 | msg_set_size(msg, sizeof(l_ptr->proto_msg)); |
438 | msg_set_session(msg, (tipc_random & 0xffff)); | 438 | msg_set_session(msg, (tipc_random & 0xffff)); |
439 | msg_set_bearer_id(msg, b_ptr->identity); | 439 | msg_set_bearer_id(msg, b_ptr->identity); |
@@ -1025,7 +1025,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
1025 | u32 size = msg_size(msg); | 1025 | u32 size = msg_size(msg); |
1026 | u32 dsz = msg_data_sz(msg); | 1026 | u32 dsz = msg_data_sz(msg); |
1027 | u32 queue_size = l_ptr->out_queue_size; | 1027 | u32 queue_size = l_ptr->out_queue_size; |
1028 | u32 imp = msg_tot_importance(msg); | 1028 | u32 imp = tipc_msg_tot_importance(msg); |
1029 | u32 queue_limit = l_ptr->queue_limit[imp]; | 1029 | u32 queue_limit = l_ptr->queue_limit[imp]; |
1030 | u32 max_packet = l_ptr->max_pkt; | 1030 | u32 max_packet = l_ptr->max_pkt; |
1031 | 1031 | ||
@@ -1090,7 +1090,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
1090 | struct tipc_msg bundler_hdr; | 1090 | struct tipc_msg bundler_hdr; |
1091 | 1091 | ||
1092 | if (bundler) { | 1092 | if (bundler) { |
1093 | msg_init(&bundler_hdr, MSG_BUNDLER, OPEN_MSG, | 1093 | tipc_msg_init(&bundler_hdr, MSG_BUNDLER, OPEN_MSG, |
1094 | INT_H_SIZE, l_ptr->addr); | 1094 | INT_H_SIZE, l_ptr->addr); |
1095 | skb_copy_to_linear_data(bundler, &bundler_hdr, | 1095 | skb_copy_to_linear_data(bundler, &bundler_hdr, |
1096 | INT_H_SIZE); | 1096 | INT_H_SIZE); |
@@ -1243,7 +1243,7 @@ again: | |||
1243 | * (Must not hold any locks while building message.) | 1243 | * (Must not hold any locks while building message.) |
1244 | */ | 1244 | */ |
1245 | 1245 | ||
1246 | res = msg_build(hdr, msg_sect, num_sect, sender->publ.max_pkt, | 1246 | res = tipc_msg_build(hdr, msg_sect, num_sect, sender->publ.max_pkt, |
1247 | !sender->user_port, &buf); | 1247 | !sender->user_port, &buf); |
1248 | 1248 | ||
1249 | read_lock_bh(&tipc_net_lock); | 1249 | read_lock_bh(&tipc_net_lock); |
@@ -1354,7 +1354,7 @@ again: | |||
1354 | /* Prepare reusable fragment header: */ | 1354 | /* Prepare reusable fragment header: */ |
1355 | 1355 | ||
1356 | msg_dbg(hdr, ">FRAGMENTING>"); | 1356 | msg_dbg(hdr, ">FRAGMENTING>"); |
1357 | msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, | 1357 | tipc_msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, |
1358 | INT_H_SIZE, msg_destnode(hdr)); | 1358 | INT_H_SIZE, msg_destnode(hdr)); |
1359 | msg_set_link_selector(&fragm_hdr, sender->publ.ref); | 1359 | msg_set_link_selector(&fragm_hdr, sender->publ.ref); |
1360 | msg_set_size(&fragm_hdr, max_pkt); | 1360 | msg_set_size(&fragm_hdr, max_pkt); |
@@ -1613,7 +1613,7 @@ static void link_reset_all(unsigned long addr) | |||
1613 | tipc_node_lock(n_ptr); | 1613 | tipc_node_lock(n_ptr); |
1614 | 1614 | ||
1615 | warn("Resetting all links to %s\n", | 1615 | warn("Resetting all links to %s\n", |
1616 | addr_string_fill(addr_string, n_ptr->addr)); | 1616 | tipc_addr_string_fill(addr_string, n_ptr->addr)); |
1617 | 1617 | ||
1618 | for (i = 0; i < MAX_BEARERS; i++) { | 1618 | for (i = 0; i < MAX_BEARERS; i++) { |
1619 | if (n_ptr->links[i]) { | 1619 | if (n_ptr->links[i]) { |
@@ -1655,7 +1655,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | |||
1655 | n_ptr = l_ptr->owner->next; | 1655 | n_ptr = l_ptr->owner->next; |
1656 | tipc_node_lock(n_ptr); | 1656 | tipc_node_lock(n_ptr); |
1657 | 1657 | ||
1658 | addr_string_fill(addr_string, n_ptr->addr); | 1658 | tipc_addr_string_fill(addr_string, n_ptr->addr); |
1659 | tipc_printf(TIPC_OUTPUT, "Multicast link info for %s\n", addr_string); | 1659 | tipc_printf(TIPC_OUTPUT, "Multicast link info for %s\n", addr_string); |
1660 | tipc_printf(TIPC_OUTPUT, "Supported: %d, ", n_ptr->bclink.supported); | 1660 | tipc_printf(TIPC_OUTPUT, "Supported: %d, ", n_ptr->bclink.supported); |
1661 | tipc_printf(TIPC_OUTPUT, "Acked: %u\n", n_ptr->bclink.acked); | 1661 | tipc_printf(TIPC_OUTPUT, "Acked: %u\n", n_ptr->bclink.acked); |
@@ -2398,7 +2398,7 @@ void tipc_link_changeover(struct link *l_ptr) | |||
2398 | return; | 2398 | return; |
2399 | } | 2399 | } |
2400 | 2400 | ||
2401 | msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, | 2401 | tipc_msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, |
2402 | ORIGINAL_MSG, INT_H_SIZE, l_ptr->addr); | 2402 | ORIGINAL_MSG, INT_H_SIZE, l_ptr->addr); |
2403 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); | 2403 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); |
2404 | msg_set_msgcnt(&tunnel_hdr, msgcount); | 2404 | msg_set_msgcnt(&tunnel_hdr, msgcount); |
@@ -2453,7 +2453,7 @@ void tipc_link_send_duplicate(struct link *l_ptr, struct link *tunnel) | |||
2453 | struct sk_buff *iter; | 2453 | struct sk_buff *iter; |
2454 | struct tipc_msg tunnel_hdr; | 2454 | struct tipc_msg tunnel_hdr; |
2455 | 2455 | ||
2456 | msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, | 2456 | tipc_msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, |
2457 | DUPLICATE_MSG, INT_H_SIZE, l_ptr->addr); | 2457 | DUPLICATE_MSG, INT_H_SIZE, l_ptr->addr); |
2458 | msg_set_msgcnt(&tunnel_hdr, l_ptr->out_queue_size); | 2458 | msg_set_msgcnt(&tunnel_hdr, l_ptr->out_queue_size); |
2459 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); | 2459 | msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); |
@@ -2659,7 +2659,7 @@ int tipc_link_send_long_buf(struct link *l_ptr, struct sk_buff *buf) | |||
2659 | 2659 | ||
2660 | /* Prepare reusable fragment header: */ | 2660 | /* Prepare reusable fragment header: */ |
2661 | 2661 | ||
2662 | msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, | 2662 | tipc_msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT, |
2663 | INT_H_SIZE, destaddr); | 2663 | INT_H_SIZE, destaddr); |
2664 | msg_set_link_selector(&fragm_hdr, msg_link_selector(inmsg)); | 2664 | msg_set_link_selector(&fragm_hdr, msg_link_selector(inmsg)); |
2665 | msg_set_long_msgno(&fragm_hdr, mod(l_ptr->long_msg_seq_no++)); | 2665 | msg_set_long_msgno(&fragm_hdr, mod(l_ptr->long_msg_seq_no++)); |
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 7ee6ae238147..fbcd46f24a9d 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -708,7 +708,7 @@ static inline void msg_set_dataoctet(struct tipc_msg *m, u32 pos) | |||
708 | #define DSC_REQ_MSG 0 | 708 | #define DSC_REQ_MSG 0 |
709 | #define DSC_RESP_MSG 1 | 709 | #define DSC_RESP_MSG 1 |
710 | 710 | ||
711 | static inline u32 msg_tot_importance(struct tipc_msg *m) | 711 | static inline u32 tipc_msg_tot_importance(struct tipc_msg *m) |
712 | { | 712 | { |
713 | if (likely(msg_isdata(m))) { | 713 | if (likely(msg_isdata(m))) { |
714 | if (likely(msg_orignode(m) == tipc_own_addr)) | 714 | if (likely(msg_orignode(m) == tipc_own_addr)) |
@@ -722,7 +722,7 @@ static inline u32 msg_tot_importance(struct tipc_msg *m) | |||
722 | } | 722 | } |
723 | 723 | ||
724 | 724 | ||
725 | static inline void msg_init(struct tipc_msg *m, u32 user, u32 type, | 725 | static inline void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, |
726 | u32 hsize, u32 destnode) | 726 | u32 hsize, u32 destnode) |
727 | { | 727 | { |
728 | memset(m, 0, hsize); | 728 | memset(m, 0, hsize); |
@@ -739,10 +739,10 @@ static inline void msg_init(struct tipc_msg *m, u32 user, u32 type, | |||
739 | } | 739 | } |
740 | 740 | ||
741 | /** | 741 | /** |
742 | * msg_calc_data_size - determine total data size for message | 742 | * tipc_msg_calc_data_size - determine total data size for message |
743 | */ | 743 | */ |
744 | 744 | ||
745 | static inline int msg_calc_data_size(struct iovec const *msg_sect, u32 num_sect) | 745 | static inline int tipc_msg_calc_data_size(struct iovec const *msg_sect, u32 num_sect) |
746 | { | 746 | { |
747 | int dsz = 0; | 747 | int dsz = 0; |
748 | int i; | 748 | int i; |
@@ -753,20 +753,20 @@ static inline int msg_calc_data_size(struct iovec const *msg_sect, u32 num_sect) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | /** | 755 | /** |
756 | * msg_build - create message using specified header and data | 756 | * tipc_msg_build - create message using specified header and data |
757 | * | 757 | * |
758 | * Note: Caller must not hold any locks in case copy_from_user() is interrupted! | 758 | * Note: Caller must not hold any locks in case copy_from_user() is interrupted! |
759 | * | 759 | * |
760 | * Returns message data size or errno | 760 | * Returns message data size or errno |
761 | */ | 761 | */ |
762 | 762 | ||
763 | static inline int msg_build(struct tipc_msg *hdr, | 763 | static inline int tipc_msg_build(struct tipc_msg *hdr, |
764 | struct iovec const *msg_sect, u32 num_sect, | 764 | struct iovec const *msg_sect, u32 num_sect, |
765 | int max_size, int usrmem, struct sk_buff** buf) | 765 | int max_size, int usrmem, struct sk_buff** buf) |
766 | { | 766 | { |
767 | int dsz, sz, hsz, pos, res, cnt; | 767 | int dsz, sz, hsz, pos, res, cnt; |
768 | 768 | ||
769 | dsz = msg_calc_data_size(msg_sect, num_sect); | 769 | dsz = tipc_msg_calc_data_size(msg_sect, num_sect); |
770 | if (unlikely(dsz > TIPC_MAX_USER_MSG_SIZE)) { | 770 | if (unlikely(dsz > TIPC_MAX_USER_MSG_SIZE)) { |
771 | *buf = NULL; | 771 | *buf = NULL; |
772 | return -EINVAL; | 772 | return -EINVAL; |
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index 10a69894e2fd..6ac3c543250b 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c | |||
@@ -103,7 +103,7 @@ static struct sk_buff *named_prepare_buf(u32 type, u32 size, u32 dest) | |||
103 | 103 | ||
104 | if (buf != NULL) { | 104 | if (buf != NULL) { |
105 | msg = buf_msg(buf); | 105 | msg = buf_msg(buf); |
106 | msg_init(msg, NAME_DISTRIBUTOR, type, LONG_H_SIZE, dest); | 106 | tipc_msg_init(msg, NAME_DISTRIBUTOR, type, LONG_H_SIZE, dest); |
107 | msg_set_size(msg, LONG_H_SIZE + size); | 107 | msg_set_size(msg, LONG_H_SIZE + size); |
108 | } | 108 | } |
109 | return buf; | 109 | return buf; |
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index acab41a48d67..8ba79620db3f 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -627,7 +627,7 @@ u32 tipc_nametbl_translate(u32 type, u32 instance, u32 *destnode) | |||
627 | struct name_seq *seq; | 627 | struct name_seq *seq; |
628 | u32 ref; | 628 | u32 ref; |
629 | 629 | ||
630 | if (!in_scope(*destnode, tipc_own_addr)) | 630 | if (!tipc_in_scope(*destnode, tipc_own_addr)) |
631 | return 0; | 631 | return 0; |
632 | 632 | ||
633 | read_lock_bh(&tipc_nametbl_lock); | 633 | read_lock_bh(&tipc_nametbl_lock); |
diff --git a/net/tipc/net.c b/net/tipc/net.c index d7cd1e064a80..f61b7694138b 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -219,7 +219,7 @@ void tipc_net_route_msg(struct sk_buff *buf) | |||
219 | 219 | ||
220 | /* Handle message for this node */ | 220 | /* Handle message for this node */ |
221 | dnode = msg_short(msg) ? tipc_own_addr : msg_destnode(msg); | 221 | dnode = msg_short(msg) ? tipc_own_addr : msg_destnode(msg); |
222 | if (in_scope(dnode, tipc_own_addr)) { | 222 | if (tipc_in_scope(dnode, tipc_own_addr)) { |
223 | if (msg_isdata(msg)) { | 223 | if (msg_isdata(msg)) { |
224 | if (msg_mcast(msg)) | 224 | if (msg_mcast(msg)) |
225 | tipc_port_recv_mcast(buf, NULL); | 225 | tipc_port_recv_mcast(buf, NULL); |
@@ -277,7 +277,7 @@ int tipc_net_start(u32 addr) | |||
277 | 277 | ||
278 | info("Started in network mode\n"); | 278 | info("Started in network mode\n"); |
279 | info("Own node address %s, network identity %u\n", | 279 | info("Own node address %s, network identity %u\n", |
280 | addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); | 280 | tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); |
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | 283 | ||
diff --git a/net/tipc/node.c b/net/tipc/node.c index 17cc394f424f..b634942caba5 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -268,7 +268,7 @@ struct tipc_node *tipc_node_attach_link(struct link *l_ptr) | |||
268 | 268 | ||
269 | if (n_ptr->link_cnt >= 2) { | 269 | if (n_ptr->link_cnt >= 2) { |
270 | err("Attempt to create third link to %s\n", | 270 | err("Attempt to create third link to %s\n", |
271 | addr_string_fill(addr_string, n_ptr->addr)); | 271 | tipc_addr_string_fill(addr_string, n_ptr->addr)); |
272 | return NULL; | 272 | return NULL; |
273 | } | 273 | } |
274 | 274 | ||
@@ -280,7 +280,7 @@ struct tipc_node *tipc_node_attach_link(struct link *l_ptr) | |||
280 | } | 280 | } |
281 | err("Attempt to establish second link on <%s> to %s\n", | 281 | err("Attempt to establish second link on <%s> to %s\n", |
282 | l_ptr->b_ptr->publ.name, | 282 | l_ptr->b_ptr->publ.name, |
283 | addr_string_fill(addr_string, l_ptr->addr)); | 283 | tipc_addr_string_fill(addr_string, l_ptr->addr)); |
284 | } | 284 | } |
285 | return NULL; | 285 | return NULL; |
286 | } | 286 | } |
@@ -439,7 +439,7 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
439 | return; | 439 | return; |
440 | 440 | ||
441 | info("Lost contact with %s\n", | 441 | info("Lost contact with %s\n", |
442 | addr_string_fill(addr_string, n_ptr->addr)); | 442 | tipc_addr_string_fill(addr_string, n_ptr->addr)); |
443 | 443 | ||
444 | /* Abort link changeover */ | 444 | /* Abort link changeover */ |
445 | for (i = 0; i < MAX_BEARERS; i++) { | 445 | for (i = 0; i < MAX_BEARERS; i++) { |
@@ -602,7 +602,7 @@ u32 tipc_available_nodes(const u32 domain) | |||
602 | 602 | ||
603 | read_lock_bh(&tipc_net_lock); | 603 | read_lock_bh(&tipc_net_lock); |
604 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { | 604 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { |
605 | if (!in_scope(domain, n_ptr->addr)) | 605 | if (!tipc_in_scope(domain, n_ptr->addr)) |
606 | continue; | 606 | continue; |
607 | if (tipc_node_is_up(n_ptr)) | 607 | if (tipc_node_is_up(n_ptr)) |
608 | cnt++; | 608 | cnt++; |
@@ -651,7 +651,7 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | |||
651 | /* Add TLVs for all nodes in scope */ | 651 | /* Add TLVs for all nodes in scope */ |
652 | 652 | ||
653 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { | 653 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { |
654 | if (!in_scope(domain, n_ptr->addr)) | 654 | if (!tipc_in_scope(domain, n_ptr->addr)) |
655 | continue; | 655 | continue; |
656 | node_info.addr = htonl(n_ptr->addr); | 656 | node_info.addr = htonl(n_ptr->addr); |
657 | node_info.up = htonl(tipc_node_is_up(n_ptr)); | 657 | node_info.up = htonl(tipc_node_is_up(n_ptr)); |
@@ -711,7 +711,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) | |||
711 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { | 711 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { |
712 | u32 i; | 712 | u32 i; |
713 | 713 | ||
714 | if (!in_scope(domain, n_ptr->addr)) | 714 | if (!tipc_in_scope(domain, n_ptr->addr)) |
715 | continue; | 715 | continue; |
716 | tipc_node_lock(n_ptr); | 716 | tipc_node_lock(n_ptr); |
717 | for (i = 0; i < MAX_BEARERS; i++) { | 717 | for (i = 0; i < MAX_BEARERS; i++) { |
diff --git a/net/tipc/port.c b/net/tipc/port.c index 7641db667e0b..0737680e9266 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -116,7 +116,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, u32 domain, | |||
116 | msg_set_namelower(hdr, seq->lower); | 116 | msg_set_namelower(hdr, seq->lower); |
117 | msg_set_nameupper(hdr, seq->upper); | 117 | msg_set_nameupper(hdr, seq->upper); |
118 | msg_set_hdr_sz(hdr, MCAST_H_SIZE); | 118 | msg_set_hdr_sz(hdr, MCAST_H_SIZE); |
119 | res = msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, | 119 | res = tipc_msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, |
120 | !oport->user_port, &buf); | 120 | !oport->user_port, &buf); |
121 | if (unlikely(!buf)) | 121 | if (unlikely(!buf)) |
122 | return res; | 122 | return res; |
@@ -241,7 +241,7 @@ struct tipc_port *tipc_createport_raw(void *usr_handle, | |||
241 | p_ptr->publ.max_pkt = MAX_PKT_DEFAULT; | 241 | p_ptr->publ.max_pkt = MAX_PKT_DEFAULT; |
242 | p_ptr->publ.ref = ref; | 242 | p_ptr->publ.ref = ref; |
243 | msg = &p_ptr->publ.phdr; | 243 | msg = &p_ptr->publ.phdr; |
244 | msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0); | 244 | tipc_msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0); |
245 | msg_set_origport(msg, ref); | 245 | msg_set_origport(msg, ref); |
246 | p_ptr->last_in_seqno = 41; | 246 | p_ptr->last_in_seqno = 41; |
247 | p_ptr->sent = 1; | 247 | p_ptr->sent = 1; |
@@ -395,7 +395,7 @@ static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode, | |||
395 | buf = buf_acquire(LONG_H_SIZE); | 395 | buf = buf_acquire(LONG_H_SIZE); |
396 | if (buf) { | 396 | if (buf) { |
397 | msg = buf_msg(buf); | 397 | msg = buf_msg(buf); |
398 | msg_init(msg, usr, type, LONG_H_SIZE, destnode); | 398 | tipc_msg_init(msg, usr, type, LONG_H_SIZE, destnode); |
399 | msg_set_errcode(msg, err); | 399 | msg_set_errcode(msg, err); |
400 | msg_set_destport(msg, destport); | 400 | msg_set_destport(msg, destport); |
401 | msg_set_origport(msg, origport); | 401 | msg_set_origport(msg, origport); |
@@ -439,7 +439,7 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err) | |||
439 | return data_sz; | 439 | return data_sz; |
440 | } | 440 | } |
441 | rmsg = buf_msg(rbuf); | 441 | rmsg = buf_msg(rbuf); |
442 | msg_init(rmsg, imp, msg_type(msg), hdr_sz, msg_orignode(msg)); | 442 | tipc_msg_init(rmsg, imp, msg_type(msg), hdr_sz, msg_orignode(msg)); |
443 | msg_set_errcode(rmsg, err); | 443 | msg_set_errcode(rmsg, err); |
444 | msg_set_destport(rmsg, msg_origport(msg)); | 444 | msg_set_destport(rmsg, msg_origport(msg)); |
445 | msg_set_origport(rmsg, msg_destport(msg)); | 445 | msg_set_origport(rmsg, msg_destport(msg)); |
@@ -480,7 +480,7 @@ int tipc_port_reject_sections(struct port *p_ptr, struct tipc_msg *hdr, | |||
480 | struct sk_buff *buf; | 480 | struct sk_buff *buf; |
481 | int res; | 481 | int res; |
482 | 482 | ||
483 | res = msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, | 483 | res = tipc_msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, |
484 | !p_ptr->user_port, &buf); | 484 | !p_ptr->user_port, &buf); |
485 | if (!buf) | 485 | if (!buf) |
486 | return res; | 486 | return res; |
@@ -1343,7 +1343,7 @@ int tipc_port_recv_sections(struct port *sender, unsigned int num_sect, | |||
1343 | struct sk_buff *buf; | 1343 | struct sk_buff *buf; |
1344 | int res; | 1344 | int res; |
1345 | 1345 | ||
1346 | res = msg_build(&sender->publ.phdr, msg_sect, num_sect, | 1346 | res = tipc_msg_build(&sender->publ.phdr, msg_sect, num_sect, |
1347 | MAX_MSG_SIZE, !sender->user_port, &buf); | 1347 | MAX_MSG_SIZE, !sender->user_port, &buf); |
1348 | if (likely(buf)) | 1348 | if (likely(buf)) |
1349 | tipc_port_recv_msg(buf); | 1349 | tipc_port_recv_msg(buf); |
@@ -1383,7 +1383,7 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect) | |||
1383 | if (port_unreliable(p_ptr)) { | 1383 | if (port_unreliable(p_ptr)) { |
1384 | p_ptr->publ.congested = 0; | 1384 | p_ptr->publ.congested = 0; |
1385 | /* Just calculate msg length and return */ | 1385 | /* Just calculate msg length and return */ |
1386 | return msg_calc_data_size(msg_sect, num_sect); | 1386 | return tipc_msg_calc_data_size(msg_sect, num_sect); |
1387 | } | 1387 | } |
1388 | return -ELINKCONG; | 1388 | return -ELINKCONG; |
1389 | } | 1389 | } |
@@ -1466,7 +1466,7 @@ int tipc_forward2name(u32 ref, | |||
1466 | msg_set_hdr_sz(msg, LONG_H_SIZE); | 1466 | msg_set_hdr_sz(msg, LONG_H_SIZE); |
1467 | msg_set_nametype(msg, name->type); | 1467 | msg_set_nametype(msg, name->type); |
1468 | msg_set_nameinst(msg, name->instance); | 1468 | msg_set_nameinst(msg, name->instance); |
1469 | msg_set_lookup_scope(msg, addr_scope(domain)); | 1469 | msg_set_lookup_scope(msg, tipc_addr_scope(domain)); |
1470 | if (importance <= TIPC_CRITICAL_IMPORTANCE) | 1470 | if (importance <= TIPC_CRITICAL_IMPORTANCE) |
1471 | msg_set_importance(msg,importance); | 1471 | msg_set_importance(msg,importance); |
1472 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); | 1472 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); |
@@ -1483,7 +1483,7 @@ int tipc_forward2name(u32 ref, | |||
1483 | return res; | 1483 | return res; |
1484 | if (port_unreliable(p_ptr)) { | 1484 | if (port_unreliable(p_ptr)) { |
1485 | /* Just calculate msg length and return */ | 1485 | /* Just calculate msg length and return */ |
1486 | return msg_calc_data_size(msg_sect, num_sect); | 1486 | return tipc_msg_calc_data_size(msg_sect, num_sect); |
1487 | } | 1487 | } |
1488 | return -ELINKCONG; | 1488 | return -ELINKCONG; |
1489 | } | 1489 | } |
@@ -1539,7 +1539,7 @@ int tipc_forward_buf2name(u32 ref, | |||
1539 | msg_set_origport(msg, orig->ref); | 1539 | msg_set_origport(msg, orig->ref); |
1540 | msg_set_nametype(msg, name->type); | 1540 | msg_set_nametype(msg, name->type); |
1541 | msg_set_nameinst(msg, name->instance); | 1541 | msg_set_nameinst(msg, name->instance); |
1542 | msg_set_lookup_scope(msg, addr_scope(domain)); | 1542 | msg_set_lookup_scope(msg, tipc_addr_scope(domain)); |
1543 | msg_set_hdr_sz(msg, LONG_H_SIZE); | 1543 | msg_set_hdr_sz(msg, LONG_H_SIZE); |
1544 | msg_set_size(msg, LONG_H_SIZE + dsz); | 1544 | msg_set_size(msg, LONG_H_SIZE + dsz); |
1545 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); | 1545 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); |
@@ -1619,7 +1619,7 @@ int tipc_forward2port(u32 ref, | |||
1619 | return res; | 1619 | return res; |
1620 | if (port_unreliable(p_ptr)) { | 1620 | if (port_unreliable(p_ptr)) { |
1621 | /* Just calculate msg length and return */ | 1621 | /* Just calculate msg length and return */ |
1622 | return msg_calc_data_size(msg_sect, num_sect); | 1622 | return tipc_msg_calc_data_size(msg_sect, num_sect); |
1623 | } | 1623 | } |
1624 | return -ELINKCONG; | 1624 | return -ELINKCONG; |
1625 | } | 1625 | } |