]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
sfc: remove redundant variable old_vlan
authorColin Ian King <colin.king@canonical.com>
Wed, 4 Jul 2018 12:13:01 +0000 (13:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jul 2018 13:39:11 +0000 (22:39 +0900)
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>
drivers/net/ethernet/sfc/ef10_sriov.c

index 8820be83ce85d90bf3be0c156d88d8d11517753a..3d76fd1504c2bc38d80b051ad885f8e0b022aba9 100644 (file)
@@ -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)
@@ -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 */