Skip to contentSkip to conversation

Bluetooth: hci_ldisc: Provide a 'default' switch case

PATCH In review Fabio Estevam 2 participants 2 messages Apr 25, 2018 – Apr 26, 2018 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: hci_ldisc: Provide a 'default' switch case

From: Fabio Estevam <[email protected]>

When both CONFIG_BT_HCIUART_INTEL and CONFIG_BT_HCIUART_BCM are not selected, sparse complains like this:

drivers/bluetooth/hci_ldisc.c:437:9: warning: switch with no cases

Fix the sparse warning by proving a default switch case.

---
 drivers/bluetooth/hci_ldisc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/bluetooth/hci_ldisc.c +2 -0
index b6a7170..954213e 100644
@@ -447,6 +447,8 @@ static int hci_uart_setup(struct hci_dev *hdev)
 		btbcm_check_bdaddr(hdev);
 		break;
 #endif
+	default:
+		break;
 	}
 
 done:
Signature · 1 line
2.7.4
maintainer
#1 lore raw

Hi Fabio,

Quoted 11 lines

When both CONFIG_BT_HCIUART_INTEL and CONFIG_BT_HCIUART_BCM are not selected, sparse complains like this:

drivers/bluetooth/hci_ldisc.c:437:9: warning: switch with no cases

Fix the sparse warning by proving a default switch case.

---
drivers/bluetooth/hci_ldisc.c | 2 ++

1 file changed, 2 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel