Skip to contentSkip to conversation

Bluetooth: Mark expected switch fall-throughs

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Jan 23, 2019

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.

This patch fixes the following warnings:

net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=] net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.

---
 net/bluetooth/l2cap_core.c  | 1 +
 net/bluetooth/rfcomm/core.c | 1 +
 2 files changed, 2 insertions(+)
net/bluetooth/l2cap_core.c +1 -0
index 2a7fb517d460..a5b76e24940a 100644
@@ -4244,6 +4244,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn,
 				goto done;
 			break;
 		}
+		/* fall through */
 
 	default:
 		l2cap_chan_set_err(chan, ECONNRESET);
net/bluetooth/rfcomm/core.c +1 -0
index 1a635df80643..3a9e9d9670be 100644
@@ -483,6 +483,7 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
 		/* if closing a dlc in a session that hasn't been started,
 		 * just close and unlink the dlc
 		 */
+		/* fall through */
 
 	default:
 		rfcomm_dlc_clear_timer(d);
Signature · 1 line
2.20.1
maintainer
#1 lore raw

Hi Gustavo,

Quoted 10 lines

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

This patch fixes the following warnings:

net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=] net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Warning level 3 was used: -Wimplicit-fallthrough=3

Quoted 8 lines

This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.

---
net/bluetooth/l2cap_core.c | 1 +
net/bluetooth/rfcomm/core.c | 1 +

2 files changed, 2 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

#2 lore raw
Quoted 15 lines · Marcel Holtmann

Hi Gustavo,

Quoted 13 lines

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

This patch fixes the following warnings:

net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=] net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.

Quoted 8 lines
Quoted 5 lines

---
net/bluetooth/l2cap_core.c | 1 +
net/bluetooth/rfcomm/core.c | 1 +

2 files changed, 2 insertions(+)

patch has been applied to bluetooth-next tree.

Thank you, Marcel.

--
Gustavo