diff mbox series

[01/20] ath6kl: Mark expected switch fall-through

Message ID 7932c27ae4e53aceacb7a0a1ae26db91432e5014.1540239684.git.gustavo@embeddedor.com (mailing list archive)
State Accepted
Commit 6d9e1ecd15373c4fff03e2066581e2374c0e1e61
Delegated to: Kalle Valo
Headers show
Series Mark expected switch fall-throughs | expand

Commit Message

Gustavo A. R. Silva Oct. 22, 2018, 8:37 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 201383 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath6kl/main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Steve deRosier Oct. 22, 2018, 9:11 p.m. UTC | #1
On Mon, Oct 22, 2018 at 1:37 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 201383 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/net/wireless/ath/ath6kl/main.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
> index cb59016..5e7ea83 100644
> --- a/drivers/net/wireless/ath/ath6kl/main.c
> +++ b/drivers/net/wireless/ath/ath6kl/main.c
> @@ -389,6 +389,7 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel)
>                 if (!ik->valid || ik->key_type != WAPI_CRYPT)
>                         break;
>                 /* for WAPI, we need to set the delayed group key, continue: */
> +               /* fall through */
>         case WPA_PSK_AUTH:
>         case WPA2_PSK_AUTH:
>         case (WPA_PSK_AUTH | WPA2_PSK_AUTH):
> --
> 2.7.4
>

Looks fine to me. Though it's too bad that the compiler can't detect
the fall through as already clearly commented.

Acked-by: Steve deRosier <derosier@cal-sierra.com>

- Steve
Kalle Valo Nov. 5, 2018, 11:23 a.m. UTC | #2
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 201383 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Acked-by: Steve deRosier <derosier@cal-sierra.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

3 patches applied to ath-next branch of ath.git, thanks.

6d9e1ecd1537 ath6kl: Mark expected switch fall-through
003161445bc8 carl9170: rx: mark expected switch fall-through
f458f9f43690 carl9170: tx: mark expected switch fall-throughs
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index cb59016..5e7ea83 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -389,6 +389,7 @@  void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel)
 		if (!ik->valid || ik->key_type != WAPI_CRYPT)
 			break;
 		/* for WAPI, we need to set the delayed group key, continue: */
+		/* fall through */
 	case WPA_PSK_AUTH:
 	case WPA2_PSK_AUTH:
 	case (WPA_PSK_AUTH | WPA2_PSK_AUTH):