Skip to content

Commit 68203a6

Browse files
rverma-marvelldavem330
authored andcommitted
qed: Fix static checker warning
Static Checker Warnings: drivers/net/ethernet/qlogic/qed/qed_main.c:1510 qed_fill_link_capability() error: uninitialized symbol 'tcvr_state'. drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask() error: uninitialized symbol 'transceiver_state'. drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask() error: uninitialized symbol 'transceiver_type'. Symbols tcvr_state, transceiver_state and transceiver_type are initialized with respective default state. Fixes: c56a8be ("qed: Add supported link and advertise link to display in ethtool.") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Rahul Verma <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5ef7915 commit 68203a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/qlogic/qed/qed_mcp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,9 @@ int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
19001900
{
19011901
u32 transceiver_info;
19021902

1903+
*p_transceiver_type = ETH_TRANSCEIVER_TYPE_NONE;
1904+
*p_transceiver_state = ETH_TRANSCEIVER_STATE_UPDATING;
1905+
19031906
if (IS_VF(p_hwfn->cdev))
19041907
return -EINVAL;
19051908

@@ -1908,9 +1911,6 @@ int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
19081911
return -EBUSY;
19091912
}
19101913

1911-
*p_transceiver_type = ETH_TRANSCEIVER_TYPE_NONE;
1912-
*p_transceiver_state = ETH_TRANSCEIVER_STATE_UPDATING;
1913-
19141914
transceiver_info = qed_rd(p_hwfn, p_ptt,
19151915
p_hwfn->mcp_info->port_addr +
19161916
offsetof(struct public_port,

0 commit comments

Comments
 (0)