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;