All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_ldisc: Provide a 'default' switch case
@ 2018-04-25 22:36 Fabio Estevam
  2018-04-26  9:32 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2018-04-25 22:36 UTC (permalink / raw)
  To: marcel; +Cc: johan.hedberg, linux-bluetooth, Fabio Estevam

From: Fabio Estevam <fabio.estevam@nxp.com>

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.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/bluetooth/hci_ldisc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index b6a7170..954213e 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -447,6 +447,8 @@ static int hci_uart_setup(struct hci_dev *hdev)
 		btbcm_check_bdaddr(hdev);
 		break;
 #endif
+	default:
+		break;
 	}
 
 done:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: hci_ldisc: Provide a 'default' switch case
  2018-04-25 22:36 [PATCH] Bluetooth: hci_ldisc: Provide a 'default' switch case Fabio Estevam
@ 2018-04-26  9:32 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2018-04-26  9:32 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Johan Hedberg, BlueZ development, Fabio Estevam

Hi Fabio,

> 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.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> drivers/bluetooth/hci_ldisc.c | 2 ++
> 1 file changed, 2 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-26  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 22:36 [PATCH] Bluetooth: hci_ldisc: Provide a 'default' switch case Fabio Estevam
2018-04-26  9:32 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.