forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/mediatek/mt7601u/dma.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2015 Jakub Kicinski <kubakici@wp.pl>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2
6
- * 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.
124 */
135
146 #include "mt7601u.h"
....@@ -124,9 +116,9 @@
124116 u16 dma_len = get_unaligned_le16(data);
125117
126118 if (data_len < min_seg_len ||
127
- WARN_ON(!dma_len) ||
128
- WARN_ON(dma_len + MT_DMA_HDRS > data_len) ||
129
- WARN_ON(dma_len & 0x3))
119
+ WARN_ON_ONCE(!dma_len) ||
120
+ WARN_ON_ONCE(dma_len + MT_DMA_HDRS > data_len) ||
121
+ WARN_ON_ONCE(dma_len & 0x3))
130122 return 0;
131123
132124 return MT_DMA_HDRS + dma_len;
....@@ -203,7 +195,7 @@
203195 default:
204196 dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
205197 urb->status);
206
- /* fall through */
198
+ fallthrough;
207199 case 0:
208200 break;
209201 }
....@@ -248,7 +240,7 @@
248240 default:
249241 dev_err_ratelimited(dev->dev, "tx urb failed: %d\n",
250242 urb->status);
251
- /* fall through */
243
+ fallthrough;
252244 case 0:
253245 break;
254246 }