Skip to content

Commit

Permalink
ipv6: fix checkpatch errors of brace and trailing statements
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wang Yufen authored and David S. Miller committed Mar 29, 2014
1 parent 8db46f1 commit 49e253e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -1190,8 +1188,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
Expand Down Expand Up @@ -1219,8 +1219,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);
Expand Down

0 comments on commit 49e253e

Please sign in to comment.