All of lore.kernel.org
 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 4/4] scsi: fnic: remove set but not used 'eth_hdrs_stripped'
Date: Mon, 31 Aug 2020 16:11:26 +0800	[thread overview]
Message-ID: <20200831081126.3251288-5-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 ‘fnic_rq_cmpl_frame_recv’:
drivers/scsi/fnic/fnic_fcs.c:840:15: warning: variable
‘eth_hdrs_stripped’ set but not used [-Wunused-but-set-variable]
  840 |  unsigned int eth_hdrs_stripped;
      |               ^~~~~~~~~~~~~~~~~

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

diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 643622f8e1d9..e3384afb7cbd 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -831,7 +831,6 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc
 	struct sk_buff *skb;
 	struct fc_frame *fp;
 	struct fnic_stats *fnic_stats = &fnic->fnic_stats;
-	unsigned int eth_hdrs_stripped;
 	u8 type, color, eop, sop, ingress_port, vlan_stripped;
 	u8 fcoe = 0, fcoe_sof, fcoe_eof;
 	u8 fcoe_fc_crc_ok = 1, fcoe_enc_error = 0;
@@ -861,7 +860,6 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc
 				   &ingress_port, &packet_error,
 				   &fcoe_enc_error, &fcs_ok, &vlan_stripped,
 				   &vlan);
-		eth_hdrs_stripped = 1;
 		skb_trim(skb, fcp_bytes_written);
 		fr_sof(fp) = sof;
 		fr_eof(fp) = eof;
@@ -878,7 +876,6 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc
 				    &tcp_udp_csum_ok, &udp, &tcp,
 				    &ipv4_csum_ok, &ipv6, &ipv4,
 				    &ipv4_fragment, &fcs_ok);
-		eth_hdrs_stripped = 0;
 		skb_trim(skb, bytes_written);
 		if (!fcs_ok) {
 			atomic64_inc(&fnic_stats->misc_stats.frame_errors);
-- 
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 ` [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 ` Jason Yan [this message]
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-5-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.