* [PATCH net 1/1] qed: Fix static checker warning
@ 2018-10-23 15:04 Rahul Verma
2018-10-23 18:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Rahul Verma @ 2018-10-23 15:04 UTC (permalink / raw)
To: davem; +Cc: netdev, Ariel.Elior, Dept-EngEverestLinuxL2, Rahul Verma
From: Rahul Verma <Rahul.Verma@cavium.com>
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: c56a8be7e7aa (qed: Add supported link and advertise link to display in ethtool.)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rahul Verma <Rahul.Verma@cavium.com>
---
drivers/net/ethernet/qlogic/qed/qed_mcp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index 386ee54..f40f654 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -1900,6 +1900,9 @@ int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
{
u32 transceiver_info;
+ *p_transceiver_type = ETH_TRANSCEIVER_TYPE_NONE;
+ *p_transceiver_state = ETH_TRANSCEIVER_STATE_UPDATING;
+
if (IS_VF(p_hwfn->cdev))
return -EINVAL;
@@ -1908,9 +1911,6 @@ int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
return -EBUSY;
}
- *p_transceiver_type = ETH_TRANSCEIVER_TYPE_NONE;
- *p_transceiver_state = ETH_TRANSCEIVER_STATE_UPDATING;
-
transceiver_info = qed_rd(p_hwfn, p_ptt,
p_hwfn->mcp_info->port_addr +
offsetof(struct public_port,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net 1/1] qed: Fix static checker warning
2018-10-23 15:04 [PATCH net 1/1] qed: Fix static checker warning Rahul Verma
@ 2018-10-23 18:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-10-23 18:05 UTC (permalink / raw)
To: rahul.verma; +Cc: netdev, Ariel.Elior, Dept-EngEverestLinuxL2
From: Rahul Verma <rahul.verma@cavium.com>
Date: Tue, 23 Oct 2018 08:04:24 -0700
> From: Rahul Verma <Rahul.Verma@cavium.com>
>
> 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: c56a8be7e7aa (qed: Add supported link and advertise link to display in ethtool.)
Referenced commits shall be of the form:
SHA1_ID ("Commit header text.")
Meaning that text must be contained inside of parenthesis and also double quotes.
Please do not forget the double quotes in the future.
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Rahul Verma <Rahul.Verma@cavium.com>
Fixed, and applied.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-24 2:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-23 15:04 [PATCH net 1/1] qed: Fix static checker warning Rahul Verma
2018-10-23 18:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox