1
0
Fork 0
alistair23-linux/drivers/net/ethernet/amd/xgbe
Gustavo A. R. Silva a36de5b775 amd-xgbe: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

In file included from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:129:
drivers/net/ethernet/amd/xgbe/xgbe-drv.c: In function ‘xgbe_set_hwtstamp_settings’:
drivers/net/ethernet/amd/xgbe/xgbe-common.h:1392:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
  (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-common.h:1419:2: note: in expansion of macro ‘SET_BITS’
  SET_BITS((_var),      \
  ^~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1614:3: note: in expansion of macro ‘XGMAC_SET_BITS’
   XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
   ^~~~~~~~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1616:2: note: here
  case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
  ^~~~
In file included from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:129:
drivers/net/ethernet/amd/xgbe/xgbe-common.h:1392:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
  (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-common.h:1419:2: note: in expansion of macro ‘SET_BITS’
  SET_BITS((_var),      \
  ^~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1625:3: note: in expansion of macro ‘XGMAC_SET_BITS’
   XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
   ^~~~~~~~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1627:2: note: here
  case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
  ^~~~
In file included from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:129:
drivers/net/ethernet/amd/xgbe/xgbe-common.h:1392:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
  (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-common.h:1419:2: note: in expansion of macro ‘SET_BITS’
  SET_BITS((_var),      \
  ^~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1636:3: note: in expansion of macro ‘XGMAC_SET_BITS’
   XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
   ^~~~~~~~~~~~~~
drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1638:2: note: here
  case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
  ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

Notice that, in this particular case, the code comments are modified
in accordance with what GCC is expecting to find.

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-26 11:28:47 -04:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xgbe-common.h amd-xgbe: Fix mdio access for non-zero ports and clause 45 PHYs 2019-01-17 22:06:54 -08:00
xgbe-dcb.c amd-xgbe: Do traffic class setup when called through dcbnl 2016-02-17 15:22:20 -05:00
xgbe-debugfs.c amd-xgbe: Improve KR auto-negotiation and training 2018-04-23 21:24:22 -04:00
xgbe-desc.c amd-xgbe: use dma_mapping_error to check map errors 2018-07-25 21:17:17 -07:00
xgbe-dev.c net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
xgbe-drv.c amd-xgbe: Mark expected switch fall-throughs 2019-04-26 11:28:47 -04:00
xgbe-ethtool.c amd-xgbe: Add ethtool show/set channels support 2018-05-23 16:33:00 -04:00
xgbe-i2c.c amd-xgbe: Re-issue interrupt if interrupt status not cleared 2017-06-29 15:14:18 -04:00
xgbe-main.c amd-xgbe: Prepare for ethtool set-channel support 2018-05-23 16:33:00 -04:00
xgbe-mdio.c net: fix amd-xgbe flow-control issue 2018-07-26 09:29:59 -07:00
xgbe-pci.c amd-xgbe: Read and save the port property registers during probe 2018-05-23 16:33:00 -04:00
xgbe-phy-v1.c amd-xgbe: Convert to using the new link mode settings 2017-08-18 16:30:17 -07:00
xgbe-phy-v2.c net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
xgbe-platform.c amd-xgbe: Prepare for more fine grained cache coherency controls 2017-06-29 15:14:18 -04:00
xgbe-ptp.c amd-xgbe: Use the proper register during PTP initialization 2017-06-29 15:14:16 -04:00
xgbe.h amd-xgbe: Improve SFP 100Mbps auto-negotiation 2018-05-23 16:33:01 -04:00