[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53EF82DB.3070405@cogentembedded.com>
Date: Sat, 16 Aug 2014 20:12:11 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Ian Morris <ipm@...rality.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH 4/4] IPV6: checkpatch corrections
Hello.
On 8/16/2014 4:04 PM, Ian Morris wrote:
> minor coding style changes to address checkpatch warnings
> no differences according to objdump
> Signed-off-by: Ian Morris <ipm@...rality.org.uk>
> ---
> net/ipv6/route.c | 3 +--
> net/ipv6/udp.c | 3 ++-
> net/ipv6/xfrm6_tunnel.c | 9 ++++++---
> 3 files changed, 9 insertions(+), 6 deletions(-)
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index f74b041..85c11d4 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -2578,8 +2578,7 @@ static int rt6_fill_node(struct net *net,
> rtm->rtm_type = RTN_UNREACHABLE;
> break;
> }
> - }
> - else if (rt->rt6i_flags & RTF_LOCAL)
> + } else if (rt->rt6i_flags & RTF_LOCAL)
> rtm->rtm_type = RTN_LOCAL;
> else if (rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK))
> rtm->rtm_type = RTN_LOCAL;
All arms of the *if* statement should have {} if at least one has it. High
time to fix it.
[...]
> diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
> index 5743044..b30eeac 100644
> --- a/net/ipv6/xfrm6_tunnel.c
> +++ b/net/ipv6/xfrm6_tunnel.c
> @@ -268,9 +268,12 @@ static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> break;
> case ICMPV6_PARAMPROB:
> switch (code) {
> - case ICMPV6_HDR_FIELD: break;
> - case ICMPV6_UNK_NEXTHDR: break;
> - case ICMPV6_UNK_OPTION: break;
> + case ICMPV6_HDR_FIELD:
> + break;
> + case ICMPV6_UNK_NEXTHDR:
> + break;
> + case ICMPV6_UNK_OPTION:
> + break;
Could reduce this to only one *break*.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists