.. | .. |
---|
1 | | -/* |
---|
2 | | - * Copyright (C) 2016-2017 Netronome Systems, Inc. |
---|
3 | | - * |
---|
4 | | - * This software is dual licensed under the GNU General License Version 2, |
---|
5 | | - * June 1991 as shown in the file COPYING in the top-level directory of this |
---|
6 | | - * source tree or the BSD 2-Clause License provided below. You have the |
---|
7 | | - * option to license this software under the complete terms of either license. |
---|
8 | | - * |
---|
9 | | - * The BSD 2-Clause License: |
---|
10 | | - * |
---|
11 | | - * Redistribution and use in source and binary forms, with or |
---|
12 | | - * without modification, are permitted provided that the following |
---|
13 | | - * conditions are met: |
---|
14 | | - * |
---|
15 | | - * 1. Redistributions of source code must retain the above |
---|
16 | | - * copyright notice, this list of conditions and the following |
---|
17 | | - * disclaimer. |
---|
18 | | - * |
---|
19 | | - * 2. Redistributions in binary form must reproduce the above |
---|
20 | | - * copyright notice, this list of conditions and the following |
---|
21 | | - * disclaimer in the documentation and/or other materials |
---|
22 | | - * provided with the distribution. |
---|
23 | | - * |
---|
24 | | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
---|
25 | | - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
---|
26 | | - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
---|
27 | | - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
---|
28 | | - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
---|
29 | | - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
---|
30 | | - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
---|
31 | | - * SOFTWARE. |
---|
32 | | - */ |
---|
| 1 | +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
---|
| 2 | +/* Copyright (C) 2016-2018 Netronome Systems, Inc. */ |
---|
33 | 3 | |
---|
34 | 4 | #include <linux/bitops.h> |
---|
35 | 5 | #include <linux/errno.h> |
---|
.. | .. |
---|
167 | 137 | val; |
---|
168 | 138 | case NN_LM_MOD_DEC: |
---|
169 | 139 | lm_dec = true; |
---|
170 | | - /* fall through */ |
---|
| 140 | + fallthrough; |
---|
171 | 141 | case NN_LM_MOD_INC: |
---|
172 | 142 | if (val) { |
---|
173 | 143 | pr_err("LM offset in inc/dev mode\n"); |
---|
.. | .. |
---|
226 | 196 | } |
---|
227 | 197 | |
---|
228 | 198 | reg->dst_lmextn = swreg_lmextn(dst); |
---|
229 | | - reg->src_lmextn = swreg_lmextn(lreg) | swreg_lmextn(rreg); |
---|
| 199 | + reg->src_lmextn = swreg_lmextn(lreg) || swreg_lmextn(rreg); |
---|
230 | 200 | |
---|
231 | 201 | return 0; |
---|
232 | 202 | } |
---|
.. | .. |
---|
307 | 277 | } |
---|
308 | 278 | |
---|
309 | 279 | reg->dst_lmextn = swreg_lmextn(dst); |
---|
310 | | - reg->src_lmextn = swreg_lmextn(lreg) | swreg_lmextn(rreg); |
---|
| 280 | + reg->src_lmextn = swreg_lmextn(lreg) || swreg_lmextn(rreg); |
---|
311 | 281 | |
---|
312 | 282 | return 0; |
---|
313 | 283 | } |
---|