Skip to content

Commit

Permalink
sfc: remove redundant variable old_vlan
Browse files Browse the repository at this point in the history
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: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jul 4, 2018
1 parent 9b0bb10 commit 2e6dde5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/sfc/ef10_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ef10_vf *vf;
u16 old_vlan, new_vlan;
u16 new_vlan;
int rc = 0, rc2 = 0;

if (vf_i >= efx->vf_count)
Expand Down Expand Up @@ -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 */
old_vlan = vf->vlan;
vf->vlan = new_vlan;

/* Restore everything in reverse order */
Expand Down

0 comments on commit 2e6dde5

Please sign in to comment.