netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <allan.stephens@windriver.com>,
	<ying.xue@windriver.com>
Subject: [PATCH net-next 10/16] tipc: delete duplicate peerport/peernode helper functions
Date: Fri, 20 Apr 2012 17:05:18 -0400	[thread overview]
Message-ID: <1334955924-907-11-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1334955924-907-1-git-send-email-paul.gortmaker@windriver.com>

From: Allan Stephens <allan.stephens@windriver.com>

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>
---
 net/tipc/port.c |    8 ++++----
 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 3b7162c..f1f6b33 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);
 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);
 }
 
-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);
 }
@@ -1159,9 +1159,9 @@ int tipc_port_recv_msg(struct sk_buff *buf)
 	if (likely(p_ptr)) {
 		if (likely(p_ptr->connected)) {
 			if ((unlikely(msg_origport(msg) !=
-				      tipc_peer_port(p_ptr))) ||
+				      port_peerport(p_ptr))) ||
 			    (unlikely(msg_orignode(msg) !=
-				      tipc_peer_node(p_ptr))) ||
+				      port_peernode(p_ptr))) ||
 			    (unlikely(!msg_connected(msg)))) {
 				err = TIPC_ERR_NO_PORT;
 				tipc_port_unlock(p_ptr);
diff --git a/net/tipc/port.h b/net/tipc/port.h
index 9b88531..0a632a6 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)
 	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)
 {
 	return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2);
-- 
1.7.9.3

  parent reply	other threads:[~2012-04-20 21:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 21:05 [PATCH net-next 00/16] tipc: publication lists and zero node handling Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 01/16] tipc: introduce publication lists struct Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 02/16] tipc: Factor out name publication code to a separate function Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 03/16] tipc: Separate cluster-scope and zone-scope names into distinct lists Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 04/16] tipc: Update node-scope publications when network address is assigned Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 05/16] tipc: Don't record failed publication attempt as a success Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 06/16] tipc: Add routines for safe checking of node's network address Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 07/16] tipc: Ensure network address change doesn't impact name table updates Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 08/16] tipc: Optimize re-initialization of port message header templates Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 09/16] tipc: Ensure network address change doesn't impact new port Paul Gortmaker
2012-04-20 21:05 ` Paul Gortmaker [this message]
2012-04-20 21:05 ` [PATCH net-next 11/16] tipc: Ensure network address change doesn't impact local connections Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 12/16] tipc: take lock while updating node network address Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 13/16] tipc: properly handle off-node send requests with invalid addr Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 14/16] tipc: handle <0.0.0> as an alias for this node on outgoing msgs Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 15/16] tipc: Ensure network address change doesn't impact rejected message Paul Gortmaker
2012-04-20 21:05 ` [PATCH net-next 16/16] tipc: Ensure network address change doesn't impact configuration service Paul Gortmaker
2012-04-21  0:45 ` [PATCH net-next 00/16] tipc: publication lists and zero node handling David Miller
2012-04-23 14:49   ` [PATCH net-next] tipc: remove inline instances from C source files Paul Gortmaker
2012-04-24  4:41     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334955924-907-11-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=allan.stephens@windriver.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ying.xue@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).