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 <hul...@huawei.com> Signed-off-by: Zheng Bin <zhengbi...@huawei.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