linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 2/4] scsi: fnic: remove set but not used variable in is_fnic_fip_flogi_reject()
Date: Mon, 31 Aug 2020 16:11:24 +0800	[thread overview]
Message-ID: <20200831081126.3251288-3-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_fcs.c: In function ‘is_fnic_fip_flogi_reject’:
drivers/scsi/fnic/fnic_fcs.c:317:9: warning: variable ‘els_len’ set but
not used [-Wunused-but-set-variable]
  317 |  size_t els_len = 0;
      |         ^~~~~~~
drivers/scsi/fnic/fnic_fcs.c:312:21: warning: variable ‘els_dtype’ set
but not used [-Wunused-but-set-variable]
  312 |  enum fip_desc_type els_dtype = 0;
      |                     ^~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/fnic/fnic_fcs.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 673887e383cc..894c0d28c534 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -309,12 +309,10 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip,
 	struct fc_frame_header *fh = NULL;
 	struct fip_desc *desc;
 	struct fip_encaps *els;
-	enum fip_desc_type els_dtype = 0;
 	u16 op;
 	u8 els_op;
 	u8 sub;
 
-	size_t els_len = 0;
 	size_t rlen;
 	size_t dlen = 0;
 
@@ -346,10 +344,8 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip,
 		if (dlen < sizeof(*els) + sizeof(*fh) + 1)
 			return 0;
 
-		els_len = dlen - sizeof(*els);
 		els = (struct fip_encaps *)desc;
 		fh = (struct fc_frame_header *)(els + 1);
-		els_dtype = desc->fip_dtype;
 
 		if (!fh)
 			return 0;
-- 
2.25.4


  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 ` [PATCH 1/4] scsi: fnic: remove set but not used 'old_vlan' Jason Yan
2020-08-31  8:11 ` Jason Yan [this message]
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-3-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).