提交 2e6dde5c 编写于 作者: C Colin Ian King 提交者: David S. Miller

sfc: remove redundant variable old_vlan

Variable old_vlan is being assigned but is never used hence it is
and can be removed.

Cleans up clang warning:
warning: variable 'old_vlan' set but not used [-Wunused-but-set-variable]
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9b0bb10a
...@@ -564,7 +564,7 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan, ...@@ -564,7 +564,7 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan,
{ {
struct efx_ef10_nic_data *nic_data = efx->nic_data; struct efx_ef10_nic_data *nic_data = efx->nic_data;
struct ef10_vf *vf; struct ef10_vf *vf;
u16 old_vlan, new_vlan; u16 new_vlan;
int rc = 0, rc2 = 0; int rc = 0, rc2 = 0;
if (vf_i >= efx->vf_count) if (vf_i >= efx->vf_count)
...@@ -619,7 +619,6 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan, ...@@ -619,7 +619,6 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan,
} }
/* Do the actual vlan change */ /* Do the actual vlan change */
old_vlan = vf->vlan;
vf->vlan = new_vlan; vf->vlan = new_vlan;
/* Restore everything in reverse order */ /* Restore everything in reverse order */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册