* [PATCH] sfc: remove redundant variable old_vlan
@ 2018-07-04 12:13 Colin King
2018-07-04 13:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-04 12:13 UTC (permalink / raw)
To: Solarflare linux maintainers, Edward Cree, Bert Kenward,
David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/net/ethernet/sfc/ef10_sriov.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index 8820be83ce85..3d76fd1504c2 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -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 */
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sfc: remove redundant variable old_vlan
2018-07-04 12:13 [PATCH] sfc: remove redundant variable old_vlan Colin King
@ 2018-07-04 13:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-04 13:41 UTC (permalink / raw)
To: colin.king
Cc: linux-net-drivers, ecree, bkenward, netdev, kernel-janitors,
linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Wed, 4 Jul 2018 13:13:01 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-04 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04 12:13 [PATCH] sfc: remove redundant variable old_vlan Colin King
2018-07-04 13:41 ` 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).