Message ID | 20200429012358.30007-1-zhengbin13@huawei.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | [-next] hinic: remove set but not used variable 'func_id' | expand |
From: Zheng Bin <zhengbin13@huawei.com> Date: Wed, 29 Apr 2020 09:23:57 +0800 > 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@huawei.com> > Signed-off-by: Zheng Bin <zhengbin13@huawei.com> This does not apply cleanly to the net-next tree.
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);
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@huawei.com> Signed-off-by: Zheng Bin <zhengbin13@huawei.com> --- drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 2 -- 1 file changed, 2 deletions(-) -- 2.26.0.106.g9fadedd