diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2012-04-17 18:36:42 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-04-19 15:46:43 -0400 |
commit | d0e17fedc2aeb0c4db09434787ef6d432582e050 (patch) | |
tree | 5e64f449fc309a6fb9be4e5b954f8ce286abfa62 | |
parent | f21536d1e73c36b37c50f71013c67f19db77d4b8 (diff) |
tipc: delete duplicate peerport/peernode helper functions
Prior to commit 23dd4cce387124ec3ea06ca30d17854ae4d9b772
"tipc: Combine port structure with tipc_port structure"
there was a need for the two sets of helper functions. But
now they are just duplicates. Remove the globally visible
ones, and mark the remaining ones as inline.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | net/tipc/port.c | 8 | ||||
-rw-r--r-- | net/tipc/port.h | 10 |
2 files changed, 4 insertions, 14 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index 3b7162c1f074..f1f6b33f761c 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -59,12 +59,12 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *, u32 err); | |||
59 | static void port_timeout(unsigned long ref); | 59 | static void port_timeout(unsigned long ref); |
60 | 60 | ||
61 | 61 | ||
62 | static u32 port_peernode(struct tipc_port *p_ptr) | 62 | static inline u32 port_peernode(struct tipc_port *p_ptr) |
63 | { | 63 | { |
64 | return msg_destnode(&p_ptr->phdr); | 64 | return msg_destnode(&p_ptr->phdr); |
65 | } | 65 | } |
66 | 66 | ||
67 | static u32 port_peerport(struct tipc_port *p_ptr) | 67 | static inline u32 port_peerport(struct tipc_port *p_ptr) |
68 | { | 68 | { |
69 | return msg_destport(&p_ptr->phdr); | 69 | return msg_destport(&p_ptr->phdr); |
70 | } | 70 | } |
@@ -1159,9 +1159,9 @@ int tipc_port_recv_msg(struct sk_buff *buf) | |||
1159 | if (likely(p_ptr)) { | 1159 | if (likely(p_ptr)) { |
1160 | if (likely(p_ptr->connected)) { | 1160 | if (likely(p_ptr->connected)) { |
1161 | if ((unlikely(msg_origport(msg) != | 1161 | if ((unlikely(msg_origport(msg) != |
1162 | tipc_peer_port(p_ptr))) || | 1162 | port_peerport(p_ptr))) || |
1163 | (unlikely(msg_orignode(msg) != | 1163 | (unlikely(msg_orignode(msg) != |
1164 | tipc_peer_node(p_ptr))) || | 1164 | port_peernode(p_ptr))) || |
1165 | (unlikely(!msg_connected(msg)))) { | 1165 | (unlikely(!msg_connected(msg)))) { |
1166 | err = TIPC_ERR_NO_PORT; | 1166 | err = TIPC_ERR_NO_PORT; |
1167 | tipc_port_unlock(p_ptr); | 1167 | tipc_port_unlock(p_ptr); |
diff --git a/net/tipc/port.h b/net/tipc/port.h index 9b88531e5a61..0a632a6fc059 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
@@ -257,16 +257,6 @@ static inline struct tipc_port *tipc_port_deref(u32 ref) | |||
257 | return (struct tipc_port *)tipc_ref_deref(ref); | 257 | return (struct tipc_port *)tipc_ref_deref(ref); |
258 | } | 258 | } |
259 | 259 | ||
260 | static inline u32 tipc_peer_port(struct tipc_port *p_ptr) | ||
261 | { | ||
262 | return msg_destport(&p_ptr->phdr); | ||
263 | } | ||
264 | |||
265 | static inline u32 tipc_peer_node(struct tipc_port *p_ptr) | ||
266 | { | ||
267 | return msg_destnode(&p_ptr->phdr); | ||
268 | } | ||
269 | |||
270 | static inline int tipc_port_congested(struct tipc_port *p_ptr) | 260 | static inline int tipc_port_congested(struct tipc_port *p_ptr) |
271 | { | 261 | { |
272 | return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2); | 262 | return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2); |