Skip to contentSkip to conversation

Bluetooth: Mark expected switch fall-throughs

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Mar 30, 2018 – Mar 31, 2018

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

PATCH 1/1 Bluetooth: Mark expected switch fall-throughs

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

---
 net/bluetooth/mgmt.c        | 1 +
 net/bluetooth/rfcomm/sock.c | 1 +
 2 files changed, 2 insertions(+)
net/bluetooth/mgmt.c +1 -0
index 6e9fc86..8a80d48 100644
@@ -4801,6 +4801,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
 		case MGMT_LTK_P256_DEBUG:
 			authenticated = 0x00;
 			type = SMP_LTK_P256_DEBUG;
+			/* fall through */
 		default:
 			continue;
 		}
net/bluetooth/rfcomm/sock.c +1 -0
index 93a3b21..d606e92 100644
@@ -221,6 +221,7 @@ static void __rfcomm_sock_close(struct sock *sk)
 	case BT_CONFIG:
 	case BT_CONNECTED:
 		rfcomm_dlc_close(d, 0);
+		/* fall through */
 
 	default:
 		sock_set_flag(sk, SOCK_ZAPPED);
Signature · 1 line
2.7.4
maintainer
#1 lore raw

Hi Gustavo,

Quoted 8 lines

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

---
net/bluetooth/mgmt.c | 1 +
net/bluetooth/rfcomm/sock.c | 1 +

2 files changed, 2 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel