forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/nfc/st21nfca/dep.c
....@@ -1,17 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2014 STMicroelectronics SAS. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms and conditions of the GNU General Public License,
6
- * version 2, as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
12
- *
13
- * You should have received a copy of the GNU General Public License
14
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
154 */
165
176 #include <net/nfc/hci.h>
....@@ -77,7 +66,7 @@
7766 u8 bsi;
7867 u8 bri;
7968 u8 ppi;
80
- u8 gbi[0];
69
+ u8 gbi[];
8170 } __packed;
8271
8372 struct st21nfca_atr_res {
....@@ -90,7 +79,7 @@
9079 u8 bri;
9180 u8 to;
9281 u8 ppi;
93
- u8 gbi[0];
82
+ u8 gbi[];
9483 } __packed;
9584
9685 struct st21nfca_psl_req {
....@@ -402,6 +391,7 @@
402391 default:
403392 return 1;
404393 }
394
+ break;
405395 default:
406396 return 1;
407397 }
....@@ -621,6 +611,7 @@
621611 switch (ST21NFCA_NFC_DEP_PFB_TYPE(dep_res->pfb)) {
622612 case ST21NFCA_NFC_DEP_PFB_ACK_NACK_PDU:
623613 pr_err("Received a ACK/NACK PDU\n");
614
+ fallthrough;
624615 case ST21NFCA_NFC_DEP_PFB_I_PDU:
625616 info->dep_info.curr_nfc_dep_pni =
626617 ST21NFCA_NFC_DEP_PFB_PNI(dep_res->pfb + 1);