OSDN Git Service

igb: mark expected switch fall-through
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 29 Mar 2019 23:38:46 +0000 (16:38 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 28 May 2019 22:52:37 +0000 (15:52 -0700)
commit42277cedbaf40baef50fd4866b448eb791616b0a
tree6c1986cfa22c95b3416ad52cdeeb79db505b9416
parentb7b3ad7aaf4f5b7ef2561ae3462b2efbfbe23b12
igb: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

This patch fixes the following warning:

drivers/net/ethernet/intel/igb/e1000_82575.c: In function ‘igb_get_invariants_82575’:
drivers/net/ethernet/intel/igb/e1000_82575.c:636:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (igb_sgmii_uses_mdio_82575(hw)) {
      ^
drivers/net/ethernet/intel/igb/e1000_82575.c:642:2: note: here
  case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
  ^~~~

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

Notice that, in this particular case, the code comment is 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>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/e1000_82575.c