Skip to contentSkip to conversation

wlcore: Use fallthrough pseudo-keyword

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Oct 8, 2020 – Nov 7, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wlcore: Use fallthrough pseudo-keyword

In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall-through */ comments with the new pseudo-keyword macro fallthrough[2].

[1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10
[2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
 drivers/net/wireless/ti/wlcore/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ti/wlcore/main.c +2 -2
index 6863fd552d5e..122c7a4b374f 100644
@@ -2227,7 +2227,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
 	switch (ieee80211_vif_type_p2p(vif)) {
 	case NL80211_IFTYPE_P2P_CLIENT:
 		wlvif->p2p = 1;
-		/* fall-through */
+		fallthrough;
 	case NL80211_IFTYPE_STATION:
 	case NL80211_IFTYPE_P2P_DEVICE:
 		wlvif->bss_type = BSS_TYPE_STA_BSS;
@@ -2237,7 +2237,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
 		break;
 	case NL80211_IFTYPE_P2P_GO:
 		wlvif->p2p = 1;
-		/* fall-through */
+		fallthrough;
 	case NL80211_IFTYPE_AP:
 	case NL80211_IFTYPE_MESH_POINT:
 		wlvif->bss_type = BSS_TYPE_AP_BSS;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Gustavo A. R. Silva

In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall-through */ comments with the new pseudo-keyword macro fallthrough[2].

[1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10
[2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Patch applied to wireless-drivers-next.git, thanks.

a821e3858e4d wlcore: Use fallthrough pseudo-keyword

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20201008220905.GA8040@embeddedor/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches