hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
....@@ -1,5 +1,5 @@
11 // SPDX-License-Identifier: GPL-2.0
2
-/* Copyright(c) 2013 - 2018 Intel Corporation. */
2
+/* Copyright(c) 2013 - 2019 Intel Corporation. */
33
44 #include "fm10k_pf.h"
55 #include "fm10k_vf.h"
....@@ -1148,11 +1148,11 @@
11481148 * @results: Pointer array to message, results[0] is pointer to message
11491149 * @mbx: Pointer to mailbox information structure
11501150 *
1151
- * This function is a default handler for MSI-X requests from the VF. The
1151
+ * This function is a default handler for MSI-X requests from the VF. The
11521152 * assumption is that in this case it is acceptable to just directly
11531153 * hand off the message from the VF to the underlying shared code.
11541154 **/
1155
-s32 fm10k_iov_msg_msix_pf(struct fm10k_hw *hw, u32 **results,
1155
+s32 fm10k_iov_msg_msix_pf(struct fm10k_hw *hw, u32 __always_unused **results,
11561156 struct fm10k_mbx_info *mbx)
11571157 {
11581158 struct fm10k_vf_info *vf_info = (struct fm10k_vf_info *)mbx;
....@@ -1317,19 +1317,19 @@
13171317 case FM10K_XCAST_MODE_PROMISC:
13181318 if (vf_flags & FM10K_VF_FLAG_PROMISC_CAPABLE)
13191319 return FM10K_XCAST_MODE_PROMISC;
1320
- /* fall through */
1320
+ fallthrough;
13211321 case FM10K_XCAST_MODE_ALLMULTI:
13221322 if (vf_flags & FM10K_VF_FLAG_ALLMULTI_CAPABLE)
13231323 return FM10K_XCAST_MODE_ALLMULTI;
1324
- /* fall through */
1324
+ fallthrough;
13251325 case FM10K_XCAST_MODE_MULTI:
13261326 if (vf_flags & FM10K_VF_FLAG_MULTI_CAPABLE)
13271327 return FM10K_XCAST_MODE_MULTI;
1328
- /* fall through */
1328
+ fallthrough;
13291329 case FM10K_XCAST_MODE_NONE:
13301330 if (vf_flags & FM10K_VF_FLAG_NONE_CAPABLE)
13311331 return FM10K_XCAST_MODE_NONE;
1332
- /* fall through */
1332
+ fallthrough;
13331333 default:
13341334 break;
13351335 }
....@@ -1352,7 +1352,6 @@
13521352 struct fm10k_mbx_info *mbx)
13531353 {
13541354 struct fm10k_vf_info *vf_info = (struct fm10k_vf_info *)mbx;
1355
- u32 *result;
13561355 s32 err = 0;
13571356 u32 msg[2];
13581357 u8 mode = 0;
....@@ -1362,7 +1361,7 @@
13621361 return FM10K_ERR_PARAM;
13631362
13641363 if (!!results[FM10K_LPORT_STATE_MSG_XCAST_MODE]) {
1365
- result = results[FM10K_LPORT_STATE_MSG_XCAST_MODE];
1364
+ u32 *result = results[FM10K_LPORT_STATE_MSG_XCAST_MODE];
13661365
13671366 /* XCAST mode update requested */
13681367 err = fm10k_tlv_attr_get_u8(result, &mode);
....@@ -1566,7 +1565,7 @@
15661565 /* read remaining fields */
15671566 fault->address = fm10k_read_reg(hw, type + FM10K_FAULT_ADDR_HI);
15681567 fault->address <<= 32;
1569
- fault->address = fm10k_read_reg(hw, type + FM10K_FAULT_ADDR_LO);
1568
+ fault->address |= fm10k_read_reg(hw, type + FM10K_FAULT_ADDR_LO);
15701569 fault->specinfo = fm10k_read_reg(hw, type + FM10K_FAULT_SPECINFO);
15711570
15721571 /* clear valid bit to allow for next error */
....@@ -1642,7 +1641,7 @@
16421641 * switch API.
16431642 **/
16441643 s32 fm10k_msg_lport_map_pf(struct fm10k_hw *hw, u32 **results,
1645
- struct fm10k_mbx_info *mbx)
1644
+ struct fm10k_mbx_info __always_unused *mbx)
16461645 {
16471646 u16 glort, mask;
16481647 u32 dglort_map;
....@@ -1685,7 +1684,7 @@
16851684 * This handler configures the default VLAN for the PF
16861685 **/
16871686 static s32 fm10k_msg_update_pvid_pf(struct fm10k_hw *hw, u32 **results,
1688
- struct fm10k_mbx_info *mbx)
1687
+ struct fm10k_mbx_info __always_unused *mbx)
16891688 {
16901689 u16 glort, pvid;
16911690 u32 pvid_update;
....@@ -1746,7 +1745,7 @@
17461745 * messages that the PF has sent.
17471746 **/
17481747 s32 fm10k_msg_err_pf(struct fm10k_hw *hw, u32 **results,
1749
- struct fm10k_mbx_info *mbx)
1748
+ struct fm10k_mbx_info __always_unused *mbx)
17501749 {
17511750 struct fm10k_swapi_error err_msg;
17521751 s32 err;