Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: fnic: Remove set but not used 'eth_hdrs_stripped'

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;
| ^~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200831081126.3251288-5-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Jason Yan and committed by
Martin K. Petersen
16d7fd90 446034e3

-3
-3
drivers/scsi/fnic/fnic_fcs.c
··· 831 831 struct sk_buff *skb; 832 832 struct fc_frame *fp; 833 833 struct fnic_stats *fnic_stats = &fnic->fnic_stats; 834 - unsigned int eth_hdrs_stripped; 835 834 u8 type, color, eop, sop, ingress_port, vlan_stripped; 836 835 u8 fcoe = 0, fcoe_sof, fcoe_eof; 837 836 u8 fcoe_fc_crc_ok = 1, fcoe_enc_error = 0; ··· 860 861 &ingress_port, &packet_error, 861 862 &fcoe_enc_error, &fcs_ok, &vlan_stripped, 862 863 &vlan); 863 - eth_hdrs_stripped = 1; 864 864 skb_trim(skb, fcp_bytes_written); 865 865 fr_sof(fp) = sof; 866 866 fr_eof(fp) = eof; ··· 876 878 &tcp_udp_csum_ok, &udp, &tcp, 877 879 &ipv4_csum_ok, &ipv6, &ipv4, 878 880 &ipv4_fragment, &fcs_ok); 879 - eth_hdrs_stripped = 0; 880 881 skb_trim(skb, bytes_written); 881 882 if (!fcs_ok) { 882 883 atomic64_inc(&fnic_stats->misc_stats.frame_errors);