forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/ethernet/netronome/nfp/nfp_asm.c
....@@ -1,35 +1,5 @@
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. */
333
344 #include <linux/bitops.h>
355 #include <linux/errno.h>
....@@ -167,7 +137,7 @@
167137 val;
168138 case NN_LM_MOD_DEC:
169139 lm_dec = true;
170
- /* fall through */
140
+ fallthrough;
171141 case NN_LM_MOD_INC:
172142 if (val) {
173143 pr_err("LM offset in inc/dev mode\n");
....@@ -226,7 +196,7 @@
226196 }
227197
228198 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);
230200
231201 return 0;
232202 }
....@@ -307,7 +277,7 @@
307277 }
308278
309279 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);
311281
312282 return 0;
313283 }