提交 d0e17fed 编写于 作者: A Allan Stephens 提交者: Paul Gortmaker

tipc: delete duplicate peerport/peernode helper functions

Prior to commit 23dd4cce

    "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: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
上级 f21536d1
...@@ -59,12 +59,12 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *, u32 err); ...@@ -59,12 +59,12 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *, u32 err);
static void port_timeout(unsigned long ref); static void port_timeout(unsigned long ref);
static u32 port_peernode(struct tipc_port *p_ptr) static inline u32 port_peernode(struct tipc_port *p_ptr)
{ {
return msg_destnode(&p_ptr->phdr); return msg_destnode(&p_ptr->phdr);
} }
static u32 port_peerport(struct tipc_port *p_ptr) static inline u32 port_peerport(struct tipc_port *p_ptr)
{ {
return msg_destport(&p_ptr->phdr); return msg_destport(&p_ptr->phdr);
} }
...@@ -1159,9 +1159,9 @@ int tipc_port_recv_msg(struct sk_buff *buf) ...@@ -1159,9 +1159,9 @@ int tipc_port_recv_msg(struct sk_buff *buf)
if (likely(p_ptr)) { if (likely(p_ptr)) {
if (likely(p_ptr->connected)) { if (likely(p_ptr->connected)) {
if ((unlikely(msg_origport(msg) != if ((unlikely(msg_origport(msg) !=
tipc_peer_port(p_ptr))) || port_peerport(p_ptr))) ||
(unlikely(msg_orignode(msg) != (unlikely(msg_orignode(msg) !=
tipc_peer_node(p_ptr))) || port_peernode(p_ptr))) ||
(unlikely(!msg_connected(msg)))) { (unlikely(!msg_connected(msg)))) {
err = TIPC_ERR_NO_PORT; err = TIPC_ERR_NO_PORT;
tipc_port_unlock(p_ptr); tipc_port_unlock(p_ptr);
......
...@@ -257,16 +257,6 @@ static inline struct tipc_port *tipc_port_deref(u32 ref) ...@@ -257,16 +257,6 @@ static inline struct tipc_port *tipc_port_deref(u32 ref)
return (struct tipc_port *)tipc_ref_deref(ref); return (struct tipc_port *)tipc_ref_deref(ref);
} }
static inline u32 tipc_peer_port(struct tipc_port *p_ptr)
{
return msg_destport(&p_ptr->phdr);
}
static inline u32 tipc_peer_node(struct tipc_port *p_ptr)
{
return msg_destnode(&p_ptr->phdr);
}
static inline int tipc_port_congested(struct tipc_port *p_ptr) static inline int tipc_port_congested(struct tipc_port *p_ptr)
{ {
return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2); return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册