Thread (16 messages) 16 messages, 3 authors, 2013-05-01

Re: [PATCH v2 1/2] tipc: tipc_bcbearer_send(): simplify bearer selection

From: David Miller <davem@davemloft.net>
Date: 2013-04-29 19:44:49

From: Gerlando Falauto <redacted>
Date: Mon, 29 Apr 2013 16:13:39 +0200
Also some minor cosmetic improvements and comment style changes

Signed-off-by: Gerlando Falauto <redacted>
You're mixing too many things, and actually adding style problems.
 		struct tipc_bearer *p = bcbearer->bpairs[bp_index].primary;
+		struct tipc_bearer *b = p;
 		struct tipc_bearer *s = bcbearer->bpairs[bp_index].secondary;
Local variable declarations should be ordered from longest line
to shortest line.
-		tipc_nmap_diff(&bcbearer->remains, &p->nodes, &bcbearer->remains_new);
+		tipc_nmap_diff(&bcbearer->remains, &b->nodes,
+			&bcbearer->remains_new);
This second line is indented incorrectly, do it like this:

	func(arg1, arg2,
	     arg3, arg4);

Specifically arg3 is aligned, using the appropriate mixture of TAB
and space characters, with the first column after the openning
parenthesis of the func() call.
 		if (bcbearer->remains_new.count == bcbearer->remains.count)
-			continue;	/* bearer pair doesn't add anything */
+			continue;  /* Nothing added by bearer pair */
Why is two spaces better than a TAB, make it one space if you're going
to change this.
 		if (bcbearer->remains_new.count == 0)
-			break;	/* all targets reached */
+			break;	/* All targets reached */
Untab this gap between break; and the comment into a space too.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help