Skip to content

Commit 8066603

Browse files
anguy11Jeff Kirsher
authored andcommitted
ixgbevf: Resolve warnings for -Wimplicit-fallthrough
Additions to gcc 7 now warn whenever a switch statement falls through implicitly. This patch adds explicit fall through comments to address the following warnings: drivers/net/ethernet/intel/ixgbevf/vf.c: In function ‘ixgbevf_get_reta_locked’: drivers/net/ethernet/intel/ixgbevf/vf.c:336:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->mac.type < ixgbe_mac_X550_vf) ^ drivers/net/ethernet/intel/ixgbevf/vf.c:338:2: note: here default: ^~~~~~~ drivers/net/ethernet/intel/ixgbevf/vf.c: In function ‘ixgbevf_get_rss_key_locked’: drivers/net/ethernet/intel/ixgbevf/vf.c:402:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->mac.type < ixgbe_mac_X550_vf) ^ drivers/net/ethernet/intel/ixgbevf/vf.c:404:2: note: here default: ^~~~~~~ Signed-off-by: Tony Nguyen <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 31f5d9b commit 8066603

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/intel/ixgbevf

1 file changed

+2
-0
lines changed

drivers/net/ethernet/intel/ixgbevf/vf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ int ixgbevf_get_reta_locked(struct ixgbe_hw *hw, u32 *reta, int num_rx_queues)
335335
case ixgbe_mbox_api_12:
336336
if (hw->mac.type < ixgbe_mac_X550_vf)
337337
break;
338+
/* fall through */
338339
default:
339340
return -EOPNOTSUPP;
340341
}
@@ -401,6 +402,7 @@ int ixgbevf_get_rss_key_locked(struct ixgbe_hw *hw, u8 *rss_key)
401402
case ixgbe_mbox_api_12:
402403
if (hw->mac.type < ixgbe_mac_X550_vf)
403404
break;
405+
/* fall through */
404406
default:
405407
return -EOPNOTSUPP;
406408
}

0 commit comments

Comments
 (0)