kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Julia Lawall <Julia.Lawall@inria.fr>
Cc: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	"Joe Perches" <joe@perches.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	kernel-janitors@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	"Alexey Kuznetsov" <kuznet@ms2.inr.ac.ru>,
	"Hideaki YOSHIFUJI" <yoshfuji@linux-ipv6.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] net/ipv6: use semicolons rather than commas to separate statements
Date: Sun, 11 Oct 2020 20:05:32 +0000	[thread overview]
Message-ID: <CAHC9VhQfDueBs_nahF2xxP8bof2yH1p4PPXwfxh4xnmQeEF4XA@mail.gmail.com> (raw)
In-Reply-To: <1602412498-32025-5-git-send-email-Julia.Lawall@inria.fr>

On Sun, Oct 11, 2020 at 7:18 AM Julia Lawall <Julia.Lawall@inria.fr> wrote:
>
> Replace commas with semicolons.  Commas introduce unnecessary
> variability in the code structure and are hard to see.  What is done
> is essentially described by the following Coccinelle semantic patch
> (http://coccinelle.lip6.fr/):
>
> // <smpl>
> @@ expression e1,e2; @@
> e1
> -,
> +;
> e2
> ... when any
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
>
> ---
>  net/ipv6/calipso.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Julia.

Acked-by: Paul Moore <paul@paul-moore.com>

> diff --git a/net/ipv6/calipso.c b/net/ipv6/calipso.c
> index 8d3f66c310db..78f766019b7e 100644
> --- a/net/ipv6/calipso.c
> +++ b/net/ipv6/calipso.c
> @@ -761,7 +761,7 @@ static int calipso_genopt(unsigned char *buf, u32 start, u32 buf_len,
>         calipso[1] = len - 2;
>         *(__be32 *)(calipso + 2) = htonl(doi_def->doi);
>         calipso[6] = (len - CALIPSO_HDR_LEN) / 4;
> -       calipso[7] = secattr->attr.mls.lvl,
> +       calipso[7] = secattr->attr.mls.lvl;
>         crc = ~crc_ccitt(0xffff, calipso, len);
>         calipso[8] = crc & 0xff;
>         calipso[9] = (crc >> 8) & 0xff;

-- 
paul moore
www.paul-moore.com

  reply	other threads:[~2020-10-11 20:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 10:34 [PATCH 0/5] net: use semicolons rather than commas to separate statements Julia Lawall
2020-10-11 10:34 ` [PATCH 1/5] rxrpc: " Julia Lawall
2020-10-11 10:34 ` [PATCH 2/5] mac80211: " Julia Lawall
2020-10-11 10:34 ` [PATCH 3/5] tcp: " Julia Lawall
2020-10-11 10:34 ` [PATCH 4/5] net/ipv6: " Julia Lawall
2020-10-11 20:05   ` Paul Moore [this message]
2020-10-11 10:34 ` [PATCH 5/5] net/tls: " Julia Lawall
2020-10-12  7:00 ` [PATCH 1/5] rxrpc: " David Howells
2020-10-12  7:03   ` Julia Lawall
2020-10-14  0:15 ` [PATCH 0/5] net: " Jakub Kicinski

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=CAHC9VhQfDueBs_nahF2xxP8bof2yH1p4PPXwfxh4xnmQeEF4XA@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=valdis.kletnieks@vt.edu \
    --cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).