diff mbox series

[1/4] scsi: fnic: remove set but not used 'old_vlan'

Message ID 20200831081126.3251288-2-yanaijie@huawei.com
State New
Headers show
Series scsi: fnic: build warnings clean up | expand

Commit Message

Jason Yan Aug. 31, 2020, 8:11 a.m. UTC
This addresses the following gcc warning with "make W=1":

drivers/scsi/fnic/fnic_main.c: In function ‘fnic_set_vlan’:
drivers/scsi/fnic/fnic_main.c:555:6: warning: variable ‘old_vlan’ set
but not used [-Wunused-but-set-variable]
  555 |  u16 old_vlan;
      |      ^~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/fnic/fnic_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 7910b573bacb..8258348857e2 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -552,8 +552,7 @@  static u8 *fnic_get_mac(struct fc_lport *lport)
 
 static void fnic_set_vlan(struct fnic *fnic, u16 vlan_id)
 {
-	u16 old_vlan;
-	old_vlan = vnic_dev_set_default_vlan(fnic->vdev, vlan_id);
+	vnic_dev_set_default_vlan(fnic->vdev, vlan_id);
 }
 
 static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)