All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wangyufen <wangyufen@huawei.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Wang Yufen <wangyufen@huawei.com>
Subject: [PATCH net-next v2 2/3] ipv6: fix checkpatch errors of brace and trailing statements
Date: Fri, 28 Mar 2014 12:07:03 +0800	[thread overview]
Message-ID: <1395979624-8544-3-git-send-email-wangyufen@huawei.com> (raw)
In-Reply-To: <1395979624-8544-1-git-send-email-wangyufen@huawei.com>

From: Wang Yufen <wangyufen@huawei.com>

ERROR: open brace '{' following enum go on the same line
ERROR: open brace '{' following struct go on the same line
ERROR: trailing statements should be on next line

Signed-off-by: Wang Yufen <wangyufen@huawei.com>
---
 net/ipv6/ip6_fib.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index c626a0f..8cb6949 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -46,8 +46,7 @@
 
 static struct kmem_cache * fib6_node_kmem __read_mostly;
 
-enum fib_walk_state_t
-{
+enum fib_walk_state_t {
 #ifdef CONFIG_IPV6_SUBTREES
 	FWS_S,
 #endif
@@ -57,8 +56,7 @@ enum fib_walk_state_t
 	FWS_U
 };
 
-struct fib6_cleaner_t
-{
+struct fib6_cleaner_t {
 	struct fib6_walker_t w;
 	struct net *net;
 	int (*func)(struct rt6_info *, void *arg);
@@ -1149,8 +1147,10 @@ static struct fib6_node *fib6_repair_tree(struct net *net,
 
 		children = 0;
 		child = NULL;
-		if (fn->right) child = fn->right, children |= 1;
-		if (fn->left) child = fn->left, children |= 2;
+		if (fn->right)
+			child = fn->right, children |= 1;
+		if (fn->left)
+			child = fn->left, children |= 2;
 
 		if (children == 3 || FIB6_SUBTREE(fn)
 #ifdef CONFIG_IPV6_SUBTREES
@@ -1178,8 +1178,10 @@ static struct fib6_node *fib6_repair_tree(struct net *net,
 		} else {
 			WARN_ON(fn->fn_flags & RTN_ROOT);
 #endif
-			if (pn->right == fn) pn->right = child;
-			else if (pn->left == fn) pn->left = child;
+			if (pn->right == fn)
+				pn->right = child;
+			else if (pn->left == fn)
+				pn->left = child;
 #if RT6_DEBUG >= 2
 			else
 				WARN_ON(1);
-- 
1.7.12

  parent reply	other threads:[~2014-03-28  4:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  4:07 [PATCH net-next v2 0/3] ipv6: fix checkpatch errors and warnings Wangyufen
2014-03-28  4:07 ` [PATCH net-next v2 1/3] ipv6: fix checkpatch errors comments and space Wangyufen
2014-03-28  4:07 ` Wangyufen [this message]
2014-03-28  4:07 ` [PATCH net-next v2 3/3] ipv6: fix checkpatch errors of "foo*" and "foo * bar" Wangyufen
2014-03-28  4:22   ` Joe Perches
2014-03-28  5:40     ` David Miller
2014-03-28  5:47       ` Joe Perches
2014-03-28  9:33         ` wangyufen
2014-03-28 17:09           ` David Miller
2014-03-28 10:17       ` Hannes Frederic Sowa
2014-03-28 10:54         ` David Laight
2014-03-28 18:16           ` Hannes Frederic Sowa
2014-03-28 13:30   ` Sergei Shtylyov
2014-03-29 22:16 ` [PATCH net-next v2 0/3] ipv6: fix checkpatch errors and warnings David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-03-26  2:37 Wangyufen
2014-03-26  2:37 ` [PATCH net-next v2 2/3] ipv6: fix checkpatch errors of brace and trailing statements Wangyufen

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=1395979624-8544-3-git-send-email-wangyufen@huawei.com \
    --to=wangyufen@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.