Skip to contentSkip to conversation

Bluetooth: mark expected switch fall-throughs

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Oct 12, 2017 – Oct 14, 2017 Bluetooth drivers

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.

In this particular case, notice that I replaced the "deliberate fall-through..." comment with a "fall through" comment, which is what GCC is expecting to find.

---
 drivers/bluetooth/bcm203x.c | 2 +-
 drivers/bluetooth/hci_ll.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/bcm203x.c +1 -1
index 5ce6d41..8e9547f 100644
@@ -121,7 +121,7 @@ static void bcm203x_complete(struct urb *urb)
 		}
 
 		data->state = BCM203X_LOAD_FIRMWARE;
-
+		/* fall through */
 	case BCM203X_LOAD_FIRMWARE:
 		if (data->fw_sent == data->fw_size) {
 			usb_fill_int_urb(urb, udev, usb_rcvintpipe(udev, BCM203X_IN_EP),
drivers/bluetooth/hci_ll.c +1 -1
index 424c15a..e2c078d 100644
@@ -242,7 +242,7 @@ static void ll_device_want_to_wakeup(struct hci_uart *hu)
 		 * perfectly safe to always send one.
 		 */
 		BT_DBG("dual wake-up-indication");
-		/* deliberate fall-through - do not add break */
+		/* fall through */
 	case HCILL_ASLEEP:
 		/* acknowledge device wake up */
 		if (send_hcill_cmd(HCILL_WAKE_UP_ACK, hu) < 0) {
Signature · 1 line
2.7.4
maintainer
#1 lore raw

Hi Gustavo,

Quoted 7 lines

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

In this particular case, notice that I replaced the "deliberate fall-through..." comment with a "fall through" comment, which is what GCC is expecting to find.

Quoted 5 lines

---
drivers/bluetooth/bcm203x.c | 2 +-
drivers/bluetooth/hci_ll.c | 2 +-

2 files changed, 2 insertions(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel