From: Jason Yan <yanaijie@huawei.com>
To: <satishkh@cisco.com>, <sebaddel@cisco.com>, <kartilak@cisco.com>,
<jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<yanaijie@huawei.com>, <linux-scsi@vger.kernel.org>
Cc: Hulk Robot <hulkci@huawei.com>
Subject: [PATCH 1/4] scsi: fnic: remove set but not used 'old_vlan'
Date: Mon, 31 Aug 2020 16:11:23 +0800 [thread overview]
Message-ID: <20200831081126.3251288-2-yanaijie@huawei.com> (raw)
In-Reply-To: <20200831081126.3251288-1-yanaijie@huawei.com>
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 --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)
--
2.25.4
next prev parent reply other threads:[~2020-08-31 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 8:11 [PATCH 0/4] scsi: fnic: build warnings clean up Jason Yan
2020-08-31 8:11 ` Jason Yan [this message]
2020-08-31 8:11 ` [PATCH 2/4] scsi: fnic: remove set but not used variable in is_fnic_fip_flogi_reject() Jason Yan
2020-08-31 8:11 ` [PATCH 3/4] scsi: fnic: remove set but not used 'fr_len' Jason Yan
2020-08-31 8:11 ` [PATCH 4/4] scsi: fnic: remove set but not used 'eth_hdrs_stripped' Jason Yan
2020-09-09 2:09 ` [PATCH 0/4] scsi: fnic: build warnings clean up Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200831081126.3251288-2-yanaijie@huawei.com \
--to=yanaijie@huawei.com \
--cc=hulkci@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=kartilak@cisco.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=satishkh@cisco.com \
--cc=sebaddel@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).