浏览代码

Bluetooth: Mark expected switch fall-throughs

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

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Gustavo A. R. Silva 7 年之前
父节点
当前提交
9ea471320e
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      net/bluetooth/mgmt.c
  2. 1 0
      net/bluetooth/rfcomm/sock.c

+ 1 - 0
net/bluetooth/mgmt.c

@@ -4801,6 +4801,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
 		case MGMT_LTK_P256_DEBUG:
 		case MGMT_LTK_P256_DEBUG:
 			authenticated = 0x00;
 			authenticated = 0x00;
 			type = SMP_LTK_P256_DEBUG;
 			type = SMP_LTK_P256_DEBUG;
+			/* fall through */
 		default:
 		default:
 			continue;
 			continue;
 		}
 		}

+ 1 - 0
net/bluetooth/rfcomm/sock.c

@@ -221,6 +221,7 @@ static void __rfcomm_sock_close(struct sock *sk)
 	case BT_CONFIG:
 	case BT_CONFIG:
 	case BT_CONNECTED:
 	case BT_CONNECTED:
 		rfcomm_dlc_close(d, 0);
 		rfcomm_dlc_close(d, 0);
+		/* fall through */
 
 
 	default:
 	default:
 		sock_set_flag(sk, SOCK_ZAPPED);
 		sock_set_flag(sk, SOCK_ZAPPED);