linux/drivers/net/dsa
Nathan Chancellor 8e8673a227 net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats
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: 52c34e6e12 ("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>
Acked-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-07 12:20:46 -07:00
..
b53 net: dsa: b53: Use vlan_filtering property from dsa_switch 2019-04-30 23:05:29 -04:00
microchip net: dsa: microchip: mark expected switch fall-through 2019-04-03 21:38:29 -07:00
mv88e6xxx net: dsa: mv88e6xxx: refine SMI support 2019-05-05 21:50:22 -07:00
sja1105 net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats 2019-05-07 12:20:46 -07:00
bcm_sf2.c net: dsa: bcm_sf2: Remove print of base address 2019-03-21 13:32:35 -07:00
bcm_sf2.h net: dsa: bcm_sf2: Add support for CFP statistics 2019-02-08 22:11:07 -08:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc 2019-04-30 11:02:37 -04:00
bcm_sf2_regs.h net: dsa: bcm_sf2: Add support for CFP statistics 2019-02-08 22:11:07 -08:00
dsa_loop.c net: phy: fixed-phy: Drop GPIO from fixed_phy_add() 2019-02-04 18:33:36 -08:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa_loop_bdinfo.c net: dsa: Mock-up driver 2017-04-01 12:39:32 -07:00
Kconfig net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch 2019-05-03 10:49:17 -04:00
lan9303-core.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
lan9303.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
lan9303_i2c.c net: dsa: lan9303: Adjust indenting 2017-11-08 13:29:06 +09:00
lan9303_mdio.c net: dsa: lan9303: Adjust indenting 2017-11-08 13:29:06 +09:00
lantiq_gswip.c net: dsa: lantiq: Add Forwarding Database access 2019-05-07 10:34:45 -07:00
lantiq_pce.h net: dsa: Add Lantiq / Intel DSA driver for vrx200 2018-09-13 08:14:33 -07:00
Makefile net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch 2019-05-03 10:49:17 -04:00
mt7530.c net: dsa: mt7530: Use the DSA vlan_filtering helper function 2019-04-30 23:05:29 -04:00
mt7530.h net: dsa: mt7530: Use the DSA vlan_filtering helper function 2019-04-30 23:05:29 -04:00
mv88e6060.c net: dsa: mv88e6060: Remove support for legacy probing 2019-04-30 23:13:33 -04:00
mv88e6060.h net: dsa: mv88e6060: Replace ds with priv 2019-04-27 20:23:04 -04:00
qca8k.c net: dsa: qca8k: extend slave-bus implementations 2019-03-26 10:47:10 -07:00
qca8k.h net: dsa: qca8k: extend slave-bus implementations 2019-03-26 10:47:10 -07:00
realtek-smi.c net: dsa: realtek-smi: fix OF child-node lookup 2019-01-17 14:04:49 -08:00
realtek-smi.h net: dsa: realtek-smi: Add Realtek SMI driver 2018-07-18 13:43:38 +09:00
rtl8366.c dsa: rtl8366: Remove unused variable. 2018-07-18 14:42:18 +09:00
rtl8366rb.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
vitesse-vsc73xx.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00