Commit 49e253e3 authored by Wang Yufen's avatar Wang Yufen Committed by David S. Miller

ipv6: fix checkpatch errors of brace and trailing statements

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: default avatarWang Yufen <wangyufen@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8db46f1d
...@@ -46,8 +46,7 @@ ...@@ -46,8 +46,7 @@
static struct kmem_cache * fib6_node_kmem __read_mostly; static struct kmem_cache * fib6_node_kmem __read_mostly;
enum fib_walk_state_t enum fib_walk_state_t {
{
#ifdef CONFIG_IPV6_SUBTREES #ifdef CONFIG_IPV6_SUBTREES
FWS_S, FWS_S,
#endif #endif
...@@ -57,8 +56,7 @@ enum fib_walk_state_t ...@@ -57,8 +56,7 @@ enum fib_walk_state_t
FWS_U FWS_U
}; };
struct fib6_cleaner_t struct fib6_cleaner_t {
{
struct fib6_walker_t w; struct fib6_walker_t w;
struct net *net; struct net *net;
int (*func)(struct rt6_info *, void *arg); int (*func)(struct rt6_info *, void *arg);
...@@ -1190,8 +1188,10 @@ static struct fib6_node *fib6_repair_tree(struct net *net, ...@@ -1190,8 +1188,10 @@ static struct fib6_node *fib6_repair_tree(struct net *net,
children = 0; children = 0;
child = NULL; child = NULL;
if (fn->right) child = fn->right, children |= 1; if (fn->right)
if (fn->left) child = fn->left, children |= 2; child = fn->right, children |= 1;
if (fn->left)
child = fn->left, children |= 2;
if (children == 3 || FIB6_SUBTREE(fn) if (children == 3 || FIB6_SUBTREE(fn)
#ifdef CONFIG_IPV6_SUBTREES #ifdef CONFIG_IPV6_SUBTREES
...@@ -1219,8 +1219,10 @@ static struct fib6_node *fib6_repair_tree(struct net *net, ...@@ -1219,8 +1219,10 @@ static struct fib6_node *fib6_repair_tree(struct net *net,
} else { } else {
WARN_ON(fn->fn_flags & RTN_ROOT); WARN_ON(fn->fn_flags & RTN_ROOT);
#endif #endif
if (pn->right == fn) pn->right = child; if (pn->right == fn)
else if (pn->left == fn) pn->left = child; pn->right = child;
else if (pn->left == fn)
pn->left = child;
#if RT6_DEBUG >= 2 #if RT6_DEBUG >= 2
else else
WARN_ON(1); WARN_ON(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment