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)