Skip to contentSkip to conversation

Bluetooth: RFCOMM: Use fallthrough pseudo-keyword

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jul 8, 2020 – Jul 10, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: RFCOMM: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
 net/bluetooth/rfcomm/core.c | 2 +-
 net/bluetooth/rfcomm/sock.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/rfcomm/core.c +1 -1
index 2e20af317cea..f2bacb464ccf 100644
@@ -479,7 +479,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 */
+		fallthrough;
 
 	default:
 		rfcomm_dlc_clear_timer(d);
net/bluetooth/rfcomm/sock.c +1 -1
index df14eebe80da..0afc4bc5ab41 100644
@@ -218,7 +218,7 @@ static void __rfcomm_sock_close(struct sock *sk)
 	case BT_CONFIG:
 	case BT_CONNECTED:
 		rfcomm_dlc_close(d, 0);
-		/* fall through */
+		fallthrough;
 
 	default:
 		sock_set_flag(sk, SOCK_ZAPPED);
Signature · 1 line
2.27.0
maintainer
#1 lore raw

Hi Gustavo,

Quoted 10 lines

Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
net/bluetooth/rfcomm/core.c | 2 +-
net/bluetooth/rfcomm/sock.c | 2 +-

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

patch has been applied to bluetooth-next tree.

Regards

Marcel