Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: natechancellor@gmail.com
Cc: olteanv@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com,
	f.fainelli@gmail.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, clang-built-linux@googlegroups.com,
	ndesaulniers@google.com
Subject: Re: [PATCH] net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats
Date: Tue, 07 May 2019 12:21:05 -0700 (PDT)	[thread overview]
Message-ID: <20190507.122105.254019469250484569.davem@davemloft.net> (raw)
In-Reply-To: <20190506202447.30907-1-natechancellor@gmail.com>

From: Nathan Chancellor <natechancellor@gmail.com>
Date: Mon,  6 May 2019 13:24:47 -0700

> Clang warns:
> 
> drivers/net/dsa/sja1105/sja1105_ethtool.c:316:39: warning: suggest
> braces around initialization of subobject [-Wmissing-braces]
>         struct sja1105_port_status status = {0};
>                                              ^
>                                              {}
> 1 warning generated.
> 
> One way to fix these warnings is to add additional braces like Clang
> suggests; however, there has been a bit of push back from some
> maintainers[1][2], who just prefer memset as it is unambiguous, doesn't
> depend on a particular compiler version[3], and properly initializes all
> subobjects. Do that here so there are no more warnings.
> 
> [1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/
> [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/
> [3]: https://lore.kernel.org/lkml/20181116150432.2408a075@redhat.com/
> 
> Fixes: 52c34e6e125c ("net: dsa: sja1105: Add support for ethtool port counters")
> Link: https://github.com/ClangBuiltLinux/linux/issues/471
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied to net-next.

      parent reply	other threads:[~2019-05-07 19:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 20:24 [PATCH] net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats Nathan Chancellor
2019-05-06 20:45 ` Vladimir Oltean
2019-05-07 19:21 ` David Miller [this message]

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=20190507.122105.254019469250484569.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=clang-built-linux@googlegroups.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /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