From patchwork Mon Aug 31 08:11:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11745787 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42485138A for ; Mon, 31 Aug 2020 08:12:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 356EC20BED for ; Mon, 31 Aug 2020 08:12:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728103AbgHaIMG (ORCPT ); Mon, 31 Aug 2020 04:12:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53982 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726573AbgHaIMF (ORCPT ); Mon, 31 Aug 2020 04:12:05 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 11DD98221A663C5D8A38; Mon, 31 Aug 2020 16:12:02 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 31 Aug 2020 16:11:54 +0800 From: Jason Yan To: , , , , , , CC: Hulk Robot Subject: [PATCH 1/4] scsi: fnic: remove set but not used 'old_vlan' Date: Mon, 31 Aug 2020 16:11:23 +0800 Message-ID: <20200831081126.3251288-2-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200831081126.3251288-1-yanaijie@huawei.com> References: <20200831081126.3251288-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 Signed-off-by: Jason Yan --- 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) From patchwork Mon Aug 31 08:11:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11745783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2762B138A for ; Mon, 31 Aug 2020 08:12:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A9D9206F0 for ; Mon, 31 Aug 2020 08:12:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728041AbgHaIME (ORCPT ); Mon, 31 Aug 2020 04:12:04 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53978 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726244AbgHaIMD (ORCPT ); Mon, 31 Aug 2020 04:12:03 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0CCAA6890FC728C0B61D; Mon, 31 Aug 2020 16:12:02 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 31 Aug 2020 16:11:55 +0800 From: Jason Yan To: , , , , , , CC: Hulk Robot 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 Message-ID: <20200831081126.3251288-3-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200831081126.3251288-1-yanaijie@huawei.com> References: <20200831081126.3251288-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 Signed-off-by: Jason Yan --- 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; From patchwork Mon Aug 31 08:11:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11745791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78D3A13B1 for ; Mon, 31 Aug 2020 08:12:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B150206F0 for ; Mon, 31 Aug 2020 08:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728172AbgHaIMN (ORCPT ); Mon, 31 Aug 2020 04:12:13 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53952 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728129AbgHaIML (ORCPT ); Mon, 31 Aug 2020 04:12:11 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 07E9957EC208D680D2AE; Mon, 31 Aug 2020 16:12:02 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 31 Aug 2020 16:11:55 +0800 From: Jason Yan To: , , , , , , CC: Hulk Robot Subject: [PATCH 3/4] scsi: fnic: remove set but not used 'fr_len' Date: Mon, 31 Aug 2020 16:11:25 +0800 Message-ID: <20200831081126.3251288-4-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200831081126.3251288-1-yanaijie@huawei.com> References: <20200831081126.3251288-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘fnic_fcoe_send_vlan_req’: drivers/scsi/fnic/fnic_fcs.c:379:6: warning: variable ‘fr_len’ set but not used [-Wunused-but-set-variable] 379 | int fr_len; | ^~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/fnic/fnic_fcs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 894c0d28c534..643622f8e1d9 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -372,7 +372,6 @@ static void fnic_fcoe_send_vlan_req(struct fnic *fnic) struct fnic_stats *fnic_stats = &fnic->fnic_stats; struct sk_buff *skb; char *eth_fr; - int fr_len; struct fip_vlan *vlan; u64 vlan_tov; @@ -387,7 +386,6 @@ static void fnic_fcoe_send_vlan_req(struct fnic *fnic) if (!skb) return; - fr_len = sizeof(*vlan); eth_fr = (char *)skb->data; vlan = (struct fip_vlan *)eth_fr; From patchwork Mon Aug 31 08:11:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11745789 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6402513A4 for ; Mon, 31 Aug 2020 08:12:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DA56206F0 for ; Mon, 31 Aug 2020 08:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728145AbgHaIMN (ORCPT ); Mon, 31 Aug 2020 04:12:13 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10353 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726573AbgHaIML (ORCPT ); Mon, 31 Aug 2020 04:12:11 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1AD57713026F222955E; Mon, 31 Aug 2020 16:12:07 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 31 Aug 2020 16:11:56 +0800 From: Jason Yan To: , , , , , , CC: Hulk Robot Subject: [PATCH 4/4] scsi: fnic: remove set but not used 'eth_hdrs_stripped' Date: Mon, 31 Aug 2020 16:11:26 +0800 Message-ID: <20200831081126.3251288-5-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200831081126.3251288-1-yanaijie@huawei.com> References: <20200831081126.3251288-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 Signed-off-by: Jason Yan --- 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);