From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Allan.Stephens@windriver.com,
Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH net-next 13/26] tipc: cosmetic - function names are not to be full sentences
Date: Sun, 13 Mar 2011 17:34:01 -0400 [thread overview]
Message-ID: <1300052054-7531-14-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1300052054-7531-1-git-send-email-paul.gortmaker@windriver.com>
Function names like "tipc_node_has_redundant_links" are unweildy
and result in long lines even for simple lines. The "has" doesn't
contribute any value add, so dropping that is a slight step in the
right direction. This is a cosmetic change, basic result of:
for i in `grep -l tipc_node_has_ *` ; do sed -i s/tipc_node_has_/tipc_node_/ $i ; done
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
net/tipc/link.c | 6 +++---
net/tipc/name_distr.c | 2 +-
net/tipc/node.c | 6 +++---
net/tipc/node.h | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/tipc/link.c b/net/tipc/link.c
index d4f2780..d8a4b90 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -548,7 +548,7 @@ void tipc_link_reset(struct link *l_ptr)
tipc_node_link_down(l_ptr->owner, l_ptr);
tipc_bearer_remove_dest(l_ptr->b_ptr, l_ptr->addr);
- if (was_active_link && tipc_node_has_active_links(l_ptr->owner) &&
+ if (was_active_link && tipc_node_active_links(l_ptr->owner) &&
l_ptr->owner->permit_changeover) {
l_ptr->reset_checkpoint = checkpoint;
l_ptr->exp_msg_count = START_CHANGEOVER;
@@ -1954,7 +1954,7 @@ void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int probe_msg,
msg_set_max_pkt(msg, l_ptr->max_pkt_target);
}
- if (tipc_node_has_redundant_links(l_ptr->owner))
+ if (tipc_node_redundant_links(l_ptr->owner))
msg_set_redundant_link(msg);
else
msg_clear_redundant_link(msg);
@@ -2064,7 +2064,7 @@ static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf)
l_ptr->peer_bearer_id = msg_bearer_id(msg);
/* Synchronize broadcast sequence numbers */
- if (!tipc_node_has_redundant_links(l_ptr->owner))
+ if (!tipc_node_redundant_links(l_ptr->owner))
l_ptr->owner->bclink.last_in = mod(msg_last_bcast(msg));
break;
case STATE_MSG:
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index 1b70d5d..c9fa6df 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -111,7 +111,7 @@ static void named_cluster_distribute(struct sk_buff *buf)
struct tipc_node *n_ptr;
list_for_each_entry(n_ptr, &tipc_node_list, list) {
- if (tipc_node_has_active_links(n_ptr)) {
+ if (tipc_node_active_links(n_ptr)) {
buf_copy = skb_copy(buf, GFP_ATOMIC);
if (!buf_copy)
break;
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 66099cb..ca09b33 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -223,19 +223,19 @@ void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr)
node_lost_contact(n_ptr);
}
-int tipc_node_has_active_links(struct tipc_node *n_ptr)
+int tipc_node_active_links(struct tipc_node *n_ptr)
{
return n_ptr->active_links[0] != NULL;
}
-int tipc_node_has_redundant_links(struct tipc_node *n_ptr)
+int tipc_node_redundant_links(struct tipc_node *n_ptr)
{
return n_ptr->working_links > 1;
}
int tipc_node_is_up(struct tipc_node *n_ptr)
{
- return tipc_node_has_active_links(n_ptr);
+ return tipc_node_active_links(n_ptr);
}
struct tipc_node *tipc_node_attach_link(struct link *l_ptr)
diff --git a/net/tipc/node.h b/net/tipc/node.h
index 02e4927..dde3165 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -115,8 +115,8 @@ struct tipc_node *tipc_node_attach_link(struct link *l_ptr);
void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr);
void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr);
void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr);
-int tipc_node_has_active_links(struct tipc_node *n_ptr);
-int tipc_node_has_redundant_links(struct tipc_node *n_ptr);
+int tipc_node_active_links(struct tipc_node *n_ptr);
+int tipc_node_redundant_links(struct tipc_node *n_ptr);
int tipc_node_is_up(struct tipc_node *n_ptr);
struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space);
struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space);
--
1.7.3.3
next prev parent reply other threads:[~2011-03-13 21:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-13 21:33 [PATCH net-next 00/26] tipc: Yet another mixed bag of updates Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 01/26] tipc: Allow receiving into iovec containing multiple entries Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 02/26] tipc: Correct broadcast link peer info when displaying links Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 03/26] tipc: Add network address mask helper routines Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 04/26] tipc: Prevent null pointer error when removing a node subscription Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 05/26] tipc: Cosmetic changes to node subscription code Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 06/26] tipc: Add support for SO_RCVTIMEO socket option Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 07/26] tipc: Fix problem with missing link in "tipc-config -l" output Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 08/26] tipc: Split up unified structure of network-related variables Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 09/26] tipc: Eliminate configuration for maximum number of cluster nodes Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 10/26] tipc: Convert node object array to a hash table Paul Gortmaker
2011-03-13 21:33 ` [PATCH net-next 11/26] tipc: manually inline net_start/stop, make assoc. vars static Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 12/26] tipc: Eliminate timestamp from link protocol messages Paul Gortmaker
2011-03-13 21:34 ` Paul Gortmaker [this message]
2011-03-13 21:34 ` [PATCH net-next 14/26] tipc: make msg_set_redundant_link() consistent with other set ops Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 15/26] tipc: Fix redundant link field handling in link protocol message Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 16/26] tipc: Cosmetic changes to neighbor discovery logic Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 17/26] tipc: Give Tx of discovery responses priority over link messages Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 18/26] tipc: Optimizations to link creation code Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 19/26] tipc: Correct misnamed references to neighbor discovery domain Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 20/26] tipc: Remove unused field in bearer structure Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 21/26] tipc: Eliminate unnecessary constant for neighbor discovery msg size Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 22/26] tipc: Don't respond to neighbor discovery request on blocked bearer Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 23/26] tipc: Remove bearer flag indicating existence of broadcast address Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 24/26] tipc: Eliminate remaining support for routing table messages Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 25/26] tipc: Eliminate obsolete routine for handling routed messages Paul Gortmaker
2011-03-13 21:34 ` [PATCH net-next 26/26] tipc: Update maintenance information Paul Gortmaker
2011-03-14 1:53 ` [PATCH net-next 00/26] tipc: Yet another mixed bag of updates 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=1300052054-7531-14-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 \
/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).