* [PATCH -next] hinic: remove set but not used variable 'func_id'
@ 2020-04-29 1:23 Zheng Bin
2020-05-01 3:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Bin @ 2020-04-29 1:23 UTC (permalink / raw)
To: aviad.krawczyk, davem, netdev; +Cc: zhengbin13
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] hinic: remove set but not used variable 'func_id'
2020-04-29 1:23 [PATCH -next] hinic: remove set but not used variable 'func_id' Zheng Bin
@ 2020-05-01 3:57 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-01 3:57 UTC (permalink / raw)
To: zhengbin13; +Cc: aviad.krawczyk, netdev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-01 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 1:23 [PATCH -next] hinic: remove set but not used variable 'func_id' Zheng Bin
2020-05-01 3:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).