diff mbox series

[1/1] Bluetooth: btusb: Fix fall-through warnings

Message ID 20210805024012.18022-1-mark-yw.chen@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [1/1] Bluetooth: btusb: Fix fall-through warnings | expand

Commit Message

Mark-YW Chen (陳揚文) Aug. 5, 2021, 2:40 a.m. UTC
From: "mark-yw.chen" <mark-yw.chen@mediatek.com>

Fix fall-through warnings:
drivers/bluetooth/btusb.c: In function ‘btusb_recv_acl_mtk’:
drivers/bluetooth/btusb.c:4033:3: warning:
this statement may fall through [-Wimplicit-fallthrough=]
 4033 |   usb_disable_autosuspend(data->udev);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bluetooth/btusb.c:4034:2: note: here
 4034 |  case 0x05ff:  /* Firmware debug logging 1 */
      |  ^~~~

Signed-off-by: mark-yw.chen <mark-yw.chen@mediatek.com>
---
 drivers/bluetooth/btusb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Marcel Holtmann Aug. 5, 2021, 1:18 p.m. UTC | #1
Hi Mark,

> Fix fall-through warnings:
> drivers/bluetooth/btusb.c: In function ‘btusb_recv_acl_mtk’:
> drivers/bluetooth/btusb.c:4033:3: warning:
> this statement may fall through [-Wimplicit-fallthrough=]
> 4033 |   usb_disable_autosuspend(data->udev);
>      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/bluetooth/btusb.c:4034:2: note: here
> 4034 |  case 0x05ff:  /* Firmware debug logging 1 */
>      |  ^~~~
> 
> Signed-off-by: mark-yw.chen <mark-yw.chen@mediatek.com>
> ---
> drivers/bluetooth/btusb.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index a4cee8327295..89ff9182b7e2 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -4027,7 +4027,9 @@ static int btusb_recv_acl_mtk(struct hci_dev *hdev, struct sk_buff *skb)
> 		 * suspend and thus disable auto-suspend.
> 		 */
> 		usb_disable_autosuspend(data->udev);
> +		fallthrough;
> 	case 0x05ff:		/* Firmware debug logging 1 */
> +		fallthrough;

this one is not needed.


> 	case 0x05fe:		/* Firmware debug logging 2 */
> 		return hci_recv_diag(hdev, skb);
> 	}

Regards

Marcel
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index a4cee8327295..89ff9182b7e2 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4027,7 +4027,9 @@  static int btusb_recv_acl_mtk(struct hci_dev *hdev, struct sk_buff *skb)
 		 * suspend and thus disable auto-suspend.
 		 */
 		usb_disable_autosuspend(data->udev);
+		fallthrough;
 	case 0x05ff:		/* Firmware debug logging 1 */
+		fallthrough;
 	case 0x05fe:		/* Firmware debug logging 2 */
 		return hci_recv_diag(hdev, skb);
 	}