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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200429012358.30007-1-zhengbin13@huawei.com>
Date:   Wed, 29 Apr 2020 09:23:57 +0800
From:   Zheng Bin <zhengbin13@...wei.com>
To:     <aviad.krawczyk@...wei.com>, <davem@...emloft.net>,
        <netdev@...r.kernel.org>
CC:     <zhengbin13@...wei.com>
Subject: [PATCH -next] hinic: remove set but not used variable 'func_id'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/huawei/hinic/hinic_sriov.c:792:6: warning: variable ‘func_id’ set but not used [-Wunused-but-set-variable]

It is introduced by commit 7dd29ee12865 ("hinic:
add sriov feature support"), but never used,
so remove it.

Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zheng Bin <zhengbin13@...wei.com>
---
 drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
index b24788e9733c..d78ccef992ed 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c
@@ -789,9 +789,7 @@ static int hinic_init_vf_infos(struct hinic_func_to_io *nic_io, u16 vf_id)
 void hinic_clear_vf_infos(struct hinic_dev *nic_dev, u16 vf_id)
 {
 	struct vf_data_storage *vf_infos;
-	u16 func_id;

-	func_id = hinic_glb_pf_vf_offset(nic_dev->hwdev->hwif) + vf_id;
 	vf_infos = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id);
 	if (vf_infos->pf_set_mac)
 		hinic_port_del_mac(nic_dev, vf_infos->vf_mac_addr, 0);
--
2.26.0.106.g9fadedd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ