]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mac80211_hwsim: mark expected switch fall-through
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 29 Apr 2019 18:19:50 +0000 (13:19 -0500)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 May 2019 09:26:44 +0000 (11:26 +0200)
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warning:

drivers/net/wireless/mac80211_hwsim.c: In function ‘init_mac80211_hwsim’:
drivers/net/wireless/mac80211_hwsim.c:3853:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
    param.reg_strict = true;
    ~~~~~~~~~~~~~~~~~^~~~~~
drivers/net/wireless/mac80211_hwsim.c:3854:3: note: here
   case HWSIM_REGTEST_DRIVER_REG_ALL:
   ^~~~

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

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: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 60ca13e0f15b7b02aca1e425f8a971555ac172e3..b5274d1f30fa7e472aa85665a9cefdb3a233dfd1 100644 (file)
@@ -3851,6 +3851,7 @@ static int __init init_mac80211_hwsim(void)
                        break;
                case HWSIM_REGTEST_STRICT_ALL:
                        param.reg_strict = true;
+                       /* fall through */
                case HWSIM_REGTEST_DRIVER_REG_ALL:
                        param.reg_alpha2 = hwsim_alpha2s[0];
                        break;