netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/3] tipc: cosmetic: clean up comments and break a long line
@ 2013-05-01 17:49 Gerlando Falauto
  2013-05-01 17:49 ` [PATCH v4 2/3] tipc: tipc_bcbearer_send(): simplify bearer selection Gerlando Falauto
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerlando Falauto @ 2013-05-01 17:49 UTC (permalink / raw)
  To: netdev; +Cc: jon.maloy, erik.hugne, ying.xue, holger.brunck, Gerlando Falauto

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
---
Changes from v3:
* Added "and break a long line" to the commit message
Changes from v2:
* Split cosmetic (this patch) from functional changes (next patch)

 net/tipc/bcast.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 2655c9f..8438e01 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -584,8 +584,7 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
 {
 	int bp_index;
 
-	/*
-	 * Prepare broadcast link message for reliable transmission,
+	/* Prepare broadcast link message for reliable transmission,
 	 * if first time trying to send it;
 	 * preparation is skipped for broadcast link protocol messages
 	 * since they are sent in an unreliable manner and don't need it
@@ -613,11 +612,12 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
 		struct tipc_bearer *s = bcbearer->bpairs[bp_index].secondary;
 
 		if (!p)
-			break;	/* no more bearers to try */
+			break; /* No more bearers to try */
 
-		tipc_nmap_diff(&bcbearer->remains, &p->nodes, &bcbearer->remains_new);
+		tipc_nmap_diff(&bcbearer->remains, &p->nodes,
+			       &bcbearer->remains_new);
 		if (bcbearer->remains_new.count == bcbearer->remains.count)
-			continue;	/* bearer pair doesn't add anything */
+			continue; /* Nothing added by bearer pair */
 
 		if (!tipc_bearer_blocked(p))
 			tipc_bearer_send(p, buf, &p->media->bcast_addr);
@@ -628,13 +628,14 @@ static int tipc_bcbearer_send(struct sk_buff *buf,
 			/* unable to send on either bearer */
 			continue;
 
+		/* Swap bearers for next packet */
 		if (s) {
 			bcbearer->bpairs[bp_index].primary = s;
 			bcbearer->bpairs[bp_index].secondary = p;
 		}
 
 		if (bcbearer->remains_new.count == 0)
-			break;	/* all targets reached */
+			break; /* All targets reached */
 
 		bcbearer->remains = bcbearer->remains_new;
 	}
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-01 19:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-01 17:49 [PATCH v4 1/3] tipc: cosmetic: clean up comments and break a long line Gerlando Falauto
2013-05-01 17:49 ` [PATCH v4 2/3] tipc: tipc_bcbearer_send(): simplify bearer selection Gerlando Falauto
2013-05-01 17:49 ` [PATCH v4 3/3] tipc: pskb_copy() buffers when sending on more than one bearer Gerlando Falauto
2013-05-01 19:14 ` [PATCH v4 1/3] tipc: cosmetic: clean up comments and break a long line David Miller

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).