From patchwork Mon Sep 7 07:45:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11760085 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 47C25138E for ; Mon, 7 Sep 2020 07:46:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A08B21548 for ; Mon, 7 Sep 2020 07:46:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727874AbgIGHqP (ORCPT ); Mon, 7 Sep 2020 03:46:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:45662 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727116AbgIGHqI (ORCPT ); Mon, 7 Sep 2020 03:46:08 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5BAF0AA835BB1C160851; Mon, 7 Sep 2020 15:46:07 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 15:45:59 +0800 From: Jason Yan To: , , , , , CC: Hulk Robot Subject: [PATCH 1/4] scsi: qla1280: remove set but not used variable in qla1280_done() Date: Mon, 7 Sep 2020 15:45:15 +0800 Message-ID: <20200907074518.2326360-2-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200907074518.2326360-1-yanaijie@huawei.com> References: <20200907074518.2326360-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/qla1280.c: In function ‘qla1280_done’: drivers/scsi/qla1280.c:1244:19: warning: variable ‘lun’ set but not used [-Wunused-but-set-variable] 1244 | int bus, target, lun; | ^~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/qla1280.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 441a45349349..42c68bd98fa5 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -1241,7 +1241,7 @@ qla1280_done(struct scsi_qla_host *ha) { struct srb *sp; struct list_head *done_q; - int bus, target, lun; + int bus, target; struct scsi_cmnd *cmd; ENTER("qla1280_done"); @@ -1256,7 +1256,6 @@ qla1280_done(struct scsi_qla_host *ha) cmd = sp->cmd; bus = SCSI_BUS_32(cmd); target = SCSI_TCN_32(cmd); - lun = SCSI_LUN_32(cmd); switch ((CMD_RESULT(cmd) >> 16)) { case DID_RESET: From patchwork Mon Sep 7 07:45:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11760087 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 AF86A618 for ; Mon, 7 Sep 2020 07:46:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97259208C7 for ; Mon, 7 Sep 2020 07:46:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbgIGHqc (ORCPT ); Mon, 7 Sep 2020 03:46:32 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:45658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727835AbgIGHqI (ORCPT ); Mon, 7 Sep 2020 03:46:08 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 536D46BEB3307514F75B; Mon, 7 Sep 2020 15:46:07 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 15:45:59 +0800 From: Jason Yan To: , , , , , CC: Hulk Robot Subject: [PATCH 2/4] scsi: qla1280: remove set but not used variable in qla1280_nvram_config() Date: Mon, 7 Sep 2020 15:45:16 +0800 Message-ID: <20200907074518.2326360-3-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200907074518.2326360-1-yanaijie@huawei.com> References: <20200907074518.2326360-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/qla1280.c: In function ‘qla1280_nvram_config’: drivers/scsi/qla1280.c:2188:36: warning: variable ‘ddma_conf’ set but not used [-Wunused-but-set-variable] 2188 | uint16_t hwrev, cfg1, cdma_conf, ddma_conf; | ^~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/qla1280.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 42c68bd98fa5..72f92733e75f 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -2184,13 +2184,12 @@ qla1280_nvram_config(struct scsi_qla_host *ha) nv->cntr_flags_1.disable_loading_risc_code; if (IS_ISP1040(ha)) { - uint16_t hwrev, cfg1, cdma_conf, ddma_conf; + uint16_t hwrev, cfg1, cdma_conf; hwrev = RD_REG_WORD(®->cfg_0) & ISP_CFG0_HWMSK; cfg1 = RD_REG_WORD(®->cfg_1) & ~(BIT_4 | BIT_5 | BIT_6); cdma_conf = RD_REG_WORD(®->cdma_cfg); - ddma_conf = RD_REG_WORD(®->ddma_cfg); /* Busted fifo, says mjacob. */ if (hwrev != ISP_CFG0_1040A) From patchwork Mon Sep 7 07:45:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11760079 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 173A1746 for ; Mon, 7 Sep 2020 07:46:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08CFC21556 for ; Mon, 7 Sep 2020 07:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727850AbgIGHqM (ORCPT ); Mon, 7 Sep 2020 03:46:12 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:45624 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727827AbgIGHqI (ORCPT ); Mon, 7 Sep 2020 03:46:08 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4F469A6421ECB9EAE0F3; Mon, 7 Sep 2020 15:46:07 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 15:46:01 +0800 From: Jason Yan To: , , , , , CC: Hulk Robot Subject: [PATCH 4/4] scsi: qla1280: remove set but not used variable in qla1280_status_entry() Date: Mon, 7 Sep 2020 15:45:18 +0800 Message-ID: <20200907074518.2326360-5-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200907074518.2326360-1-yanaijie@huawei.com> References: <20200907074518.2326360-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/qla1280.c: In function ‘qla1280_status_entry’: drivers/scsi/qla1280.c:3607:28: warning: variable ‘lun’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~ drivers/scsi/qla1280.c:3607:20: warning: variable ‘target’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~~~~ drivers/scsi/qla1280.c:3607:15: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/qla1280.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index fe4b88aaf5cb..545936cb3980 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -3601,7 +3601,6 @@ static void qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, struct list_head *done_q) { - unsigned int bus, target, lun; int sense_sz; struct srb *sp; struct scsi_cmnd *cmd; @@ -3627,11 +3626,6 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, cmd = sp->cmd; - /* Generate LU queue on cntrl, target, LUN */ - bus = SCSI_BUS_32(cmd); - target = SCSI_TCN_32(cmd); - lun = SCSI_LUN_32(cmd); - if (comp_status || scsi_status) { dprintk(3, "scsi: comp_status = 0x%x, scsi_status = " "0x%x, handle = 0x%x\n", comp_status, @@ -3670,7 +3664,8 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, dprintk(2, "qla1280_status_entry: Check " "condition Sense data, b %i, t %i, " - "l %i\n", bus, target, lun); + "l %i\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), + SCSI_LUN_32(cmd)); if (sense_sz) qla1280_dump_buffer(2, (char *)cmd->sense_buffer,