All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ian Morris <ipm@chirality.org.uk>, netdev@vger.kernel.org
Subject: Re: [PATCH 4/4] IPV6: checkpatch corrections
Date: Sat, 16 Aug 2014 20:12:11 +0400	[thread overview]
Message-ID: <53EF82DB.3070405@cogentembedded.com> (raw)
In-Reply-To: <1408190687-28941-4-git-send-email-ipm@chirality.org.uk>

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@chirality.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

  reply	other threads:[~2014-08-16 16:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16 12:04 [PATCH 1/4] IPV6: checkpatch corrections Ian Morris
2014-08-16 12:04 ` [PATCH 2/4] " Ian Morris
2014-08-16 12:04 ` [PATCH 3/4] " Ian Morris
2014-08-16 12:04 ` [PATCH 4/4] " Ian Morris
2014-08-16 16:12   ` Sergei Shtylyov [this message]
2014-08-16 16:08 ` [PATCH 1/4] " Joe Perches

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=53EF82DB.3070405@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=ipm@chirality.org.uk \
    --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.