| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #include "mt7601u.h" |
|---|
| .. | .. |
|---|
| 124 | 116 | u16 dma_len = get_unaligned_le16(data); |
|---|
| 125 | 117 | |
|---|
| 126 | 118 | 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)) |
|---|
| 130 | 122 | return 0; |
|---|
| 131 | 123 | |
|---|
| 132 | 124 | return MT_DMA_HDRS + dma_len; |
|---|
| .. | .. |
|---|
| 203 | 195 | default: |
|---|
| 204 | 196 | dev_err_ratelimited(dev->dev, "rx urb failed: %d\n", |
|---|
| 205 | 197 | urb->status); |
|---|
| 206 | | - /* fall through */ |
|---|
| 198 | + fallthrough; |
|---|
| 207 | 199 | case 0: |
|---|
| 208 | 200 | break; |
|---|
| 209 | 201 | } |
|---|
| .. | .. |
|---|
| 248 | 240 | default: |
|---|
| 249 | 241 | dev_err_ratelimited(dev->dev, "tx urb failed: %d\n", |
|---|
| 250 | 242 | urb->status); |
|---|
| 251 | | - /* fall through */ |
|---|
| 243 | + fallthrough; |
|---|
| 252 | 244 | case 0: |
|---|
| 253 | 245 | break; |
|---|
| 254 | 246 | } |
|---|