lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181023150424.6046-1-rahul.verma@cavium.com>
Date:   Tue, 23 Oct 2018 08:04:24 -0700
From:   Rahul Verma <rahul.verma@...ium.com>
To:     <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <Ariel.Elior@...ium.com>,
        <Dept-EngEverestLinuxL2@...ium.com>,
        Rahul Verma <Rahul.Verma@...ium.com>
Subject: [PATCH net 1/1] qed: Fix static checker warning

From: Rahul Verma <Rahul.Verma@...ium.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@...cle.com>
Signed-off-by: Rahul Verma <Rahul.Verma@...ium.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ