linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nathan Chancellor <natechancellor@gmail.com>,
	Stefano Brivio <sbrivio@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Sabrina Dubroca <sd@queasysnail.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] geneve: Use empty braces for addr6 initializer
Date: Fri, 16 Nov 2018 18:33:40 -0800	[thread overview]
Message-ID: <138f1c15387c47fe65f4a0448f35afdd9db81933.camel@perches.com> (raw)
In-Reply-To: <20181116153701.GA16184@flashbox>

On Fri, 2018-11-16 at 08:37 -0700, Nathan Chancellor wrote:
> On Fri, Nov 16, 2018 at 03:04:32PM +0100, Stefano Brivio wrote:
> > On Mon, 12 Nov 2018 23:11:47 -0700
> > Nathan Chancellor <natechancellor@gmail.com> wrote:
> > 
> > > Clang warns:
> > > 
> > > drivers/net/geneve.c:428:29: error: suggest braces around initialization
> > > of subobject [-Werror,-Wmissing-braces]
> > >                 struct in6_addr addr6 = { 0 };
> > >                                           ^
> > >                                           {}
> > > 
> > > Most initializations of structs in the kernel seem to use this format.
[]
> > So { { { 0 } } } seems to be the safest option. We could go with static
> > but it looks even uglier to me.
> > 
> > Joe, suggestions?

If this is really an issue, I don't know why the other uses
haven't been reported.  Perhaps change the rest of them too?

$ git grep -P "struct\s+in6_addr\s+\w+\s*=\s*{\s*}"
include/net/ip6_fib.h:          struct in6_addr in6_zero = {};
include/trace/events/fib6.h:                    struct in6_addr in6_zero = {};
net/6lowpan/iphc.c:     struct in6_addr network_pfx = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};




  reply	other threads:[~2018-11-17  2:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 22:12 [PATCH] geneve: Add missing braces in addr6 initializer Nathan Chancellor
2018-11-12 22:19 ` Stefano Brivio
2018-11-12 22:20   ` Nathan Chancellor
2018-11-12 22:36 ` Joe Perches
2018-11-13  6:11 ` [PATCH net-next v2] geneve: Use empty braces for " Nathan Chancellor
2018-11-13  9:02   ` Stefano Brivio
2018-11-16 14:04   ` Stefano Brivio
2018-11-16 15:37     ` Nathan Chancellor
2018-11-17  2:33       ` Joe Perches [this message]
2018-11-17 11:31         ` Stefano Brivio
2018-11-16 20:35     ` David Miller
2018-11-17  1:36   ` [PATCH net-next v3] geneve: Initialize addr6 with memset Nathan Chancellor
2018-11-18  6:03     ` David Miller
2018-11-15 19:35 ` [PATCH] geneve: Add missing braces in addr6 initializer David Miller
2018-11-15 19:38   ` Nathan Chancellor

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=138f1c15387c47fe65f4a0448f35afdd9db81933.camel@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbrivio@redhat.com \
    --cc=sd@queasysnail.net \
    /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).