From patchwork Thu Aug 22 13:47:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Bin X-Patchwork-Id: 11109325 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 3EA8B1399 for ; Thu, 22 Aug 2019 13:42:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 279C8233FC for ; Thu, 22 Aug 2019 13:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389217AbfHVNmU (ORCPT ); Thu, 22 Aug 2019 09:42:20 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48596 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387649AbfHVNmU (ORCPT ); Thu, 22 Aug 2019 09:42:20 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CECD0D3167181D4A5089; Thu, 22 Aug 2019 21:41:39 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Thu, 22 Aug 2019 21:41:31 +0800 From: zhengbin To: , , , CC: , Subject: [PATCH 1/3] scsi: qla4xxx: remove set but not used variables 'data_size','poll','mask' Date: Thu, 22 Aug 2019 21:47:59 +0800 Message-ID: <1566481681-92765-2-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566481681-92765-1-git-send-email-zhengbin13@huawei.com> References: <1566481681-92765-1-git-send-email-zhengbin13@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qla4xxx/ql4_nx.c: In function qla4_84xx_minidump_process_rddfe: drivers/scsi/qla4xxx/ql4_nx.c:2648:23: warning: variable data_size set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_nx.c: In function qla4_84xx_minidump_process_rdmdio: drivers/scsi/qla4xxx/ql4_nx.c:2745:11: warning: variable poll set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_nx.c: In function qla4_84xx_minidump_process_pollwr: drivers/scsi/qla4xxx/ql4_nx.c:2816:47: warning: variable mask set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/scsi/qla4xxx/ql4_nx.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 5a31877..85666fb 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -2645,7 +2645,7 @@ static uint32_t qla4_84xx_minidump_process_rddfe(struct scsi_qla_host *ha, uint32_t addr1, addr2, value, data, temp, wrval; uint8_t stride, stride2; uint16_t count; - uint32_t poll, mask, data_size, modify_mask; + uint32_t poll, mask, modify_mask; uint32_t wait_count = 0; uint32_t *data_ptr = *d_ptr; struct qla8044_minidump_entry_rddfe *rddfe; @@ -2661,7 +2661,6 @@ static uint32_t qla4_84xx_minidump_process_rddfe(struct scsi_qla_host *ha, poll = le32_to_cpu(rddfe->poll); mask = le32_to_cpu(rddfe->mask); modify_mask = le32_to_cpu(rddfe->modify_mask); - data_size = le32_to_cpu(rddfe->data_size); addr2 = addr1 + stride; @@ -2742,7 +2741,7 @@ static uint32_t qla4_84xx_minidump_process_rdmdio(struct scsi_qla_host *ha, uint8_t stride1, stride2; uint32_t addr3, addr4, addr5, addr6, addr7; uint16_t count, loop_cnt; - uint32_t poll, mask; + uint32_t mask; uint32_t *data_ptr = *d_ptr; struct qla8044_minidump_entry_rdmdio *rdmdio; @@ -2754,7 +2753,6 @@ static uint32_t qla4_84xx_minidump_process_rdmdio(struct scsi_qla_host *ha, stride2 = le32_to_cpu(rdmdio->stride_2); count = le32_to_cpu(rdmdio->count); - poll = le32_to_cpu(rdmdio->poll); mask = le32_to_cpu(rdmdio->mask); value2 = le32_to_cpu(rdmdio->value_2); @@ -2813,7 +2811,7 @@ static uint32_t qla4_84xx_minidump_process_pollwr(struct scsi_qla_host *ha, struct qla8xxx_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr) { - uint32_t addr1, addr2, value1, value2, poll, mask, r_value; + uint32_t addr1, addr2, value1, value2, poll, r_value; struct qla8044_minidump_entry_pollwr *pollwr_hdr; uint32_t wait_count = 0; uint32_t rval = QLA_SUCCESS; @@ -2825,7 +2823,6 @@ static uint32_t qla4_84xx_minidump_process_pollwr(struct scsi_qla_host *ha, value2 = le32_to_cpu(pollwr_hdr->value_2); poll = le32_to_cpu(pollwr_hdr->poll); - mask = le32_to_cpu(pollwr_hdr->mask); while (wait_count < poll) { ha->isp_ops->rd_reg_indirect(ha, addr1, &r_value); From patchwork Thu Aug 22 13:48:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Bin X-Patchwork-Id: 11109323 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 B11751398 for ; Thu, 22 Aug 2019 13:41:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DB17233A2 for ; Thu, 22 Aug 2019 13:41:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389216AbfHVNlw (ORCPT ); Thu, 22 Aug 2019 09:41:52 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48584 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731907AbfHVNlw (ORCPT ); Thu, 22 Aug 2019 09:41:52 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C5F04BD9821E702B9EEE; Thu, 22 Aug 2019 21:41:39 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Thu, 22 Aug 2019 21:41:31 +0800 From: zhengbin To: , , , CC: , Subject: [PATCH 2/3] scsi: qla4xxx: remove set but not used variable 'func_number' Date: Thu, 22 Aug 2019 21:48:00 +0800 Message-ID: <1566481681-92765-3-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566481681-92765-1-git-send-email-zhengbin13@huawei.com> References: <1566481681-92765-1-git-send-email-zhengbin13@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qla4xxx/ql4_init.c: In function ql4xxx_set_mac_number: drivers/scsi/qla4xxx/ql4_init.c:17:10: warning: variable func_number set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/scsi/qla4xxx/ql4_init.c | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index 2bf5e3e..2c14384 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c @@ -14,7 +14,6 @@ static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) { uint32_t value; - uint8_t func_number; unsigned long flags; /* Get the function number */ @@ -22,7 +21,6 @@ static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) value = readw(&ha->reg->ctrl_status); spin_unlock_irqrestore(&ha->hardware_lock, flags); - func_number = (uint8_t) ((value >> 4) & 0x30); switch (value & ISP_CONTROL_FN_MASK) { case ISP_CONTROL_FN0_SCSI: ha->mac_index = 1; From patchwork Thu Aug 22 13:48:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Bin X-Patchwork-Id: 11109319 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 A5E261399 for ; Thu, 22 Aug 2019 13:41:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E06F233FC for ; Thu, 22 Aug 2019 13:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389214AbfHVNln (ORCPT ); Thu, 22 Aug 2019 09:41:43 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48588 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732117AbfHVNln (ORCPT ); Thu, 22 Aug 2019 09:41:43 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CA30E8EEDB6AE337A521; Thu, 22 Aug 2019 21:41:39 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Thu, 22 Aug 2019 21:41:31 +0800 From: zhengbin To: , , , CC: , Subject: [PATCH 3/3] scsi: qla4xxx: remove set but not used variables 'sess','dst_addr','db_base','db_len','ha' Date: Thu, 22 Aug 2019 21:48:01 +0800 Message-ID: <1566481681-92765-4-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566481681-92765-1-git-send-email-zhengbin13@huawei.com> References: <1566481681-92765-1-git-send-email-zhengbin13@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/qla4xxx/ql4_os.c: In function qla4xxx_eh_cmd_timed_out: drivers/scsi/qla4xxx/ql4_os.c:1848:24: warning: variable sess set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_os.c: In function qla4xxx_session_create: drivers/scsi/qla4xxx/ql4_os.c:3062:19: warning: variable dst_addr set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_os.c: In function qla4_8xxx_iospace_config: drivers/scsi/qla4xxx/ql4_os.c:5496:44: warning: variable db_len set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_os.c: In function qla4_8xxx_iospace_config: drivers/scsi/qla4xxx/ql4_os.c:5496:35: warning: variable db_base set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_os.c: In function qla4xxx_get_param_ddb: drivers/scsi/qla4xxx/ql4_os.c:6253:24: warning: variable ha set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/scsi/qla4xxx/ql4_os.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 8c674ec..49c87b0 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -1845,12 +1845,10 @@ static void qla4xxx_conn_get_stats(struct iscsi_cls_conn *cls_conn, static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc) { struct iscsi_cls_session *session; - struct iscsi_session *sess; unsigned long flags; enum blk_eh_timer_return ret = BLK_EH_DONE; session = starget_to_session(scsi_target(sc->device)); - sess = session->dd_data; spin_lock_irqsave(&session->lock, flags); if (session->state == ISCSI_SESSION_FAILED) @@ -3059,7 +3057,6 @@ qla4xxx_session_create(struct iscsi_endpoint *ep, struct ddb_entry *ddb_entry; uint16_t ddb_index; struct iscsi_session *sess; - struct sockaddr *dst_addr; int ret; if (!ep) { @@ -3068,7 +3065,6 @@ qla4xxx_session_create(struct iscsi_endpoint *ep, } qla_ep = ep->dd_data; - dst_addr = (struct sockaddr *)&qla_ep->dst_addr; ha = to_qla_host(qla_ep->host); DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, ha->host_no)); @@ -5493,7 +5489,7 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha) int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) { int status = 0; - unsigned long mem_base, mem_len, db_base, db_len; + unsigned long mem_base, mem_len; struct pci_dev *pdev = ha->pdev; status = pci_request_regions(pdev, DRIVER_NAME); @@ -5537,9 +5533,6 @@ int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) ((uint8_t *)ha->nx_pcibase); } - db_base = pci_resource_start(pdev, 4); /* doorbell is on bar 4 */ - db_len = pci_resource_len(pdev, 4); - return 0; iospace_error_exit: return -ENOMEM; @@ -6250,14 +6243,12 @@ static int qla4xxx_setup_boot_info(struct scsi_qla_host *ha) static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry, struct ql4_tuple_ddb *tddb) { - struct scsi_qla_host *ha; struct iscsi_cls_session *cls_sess; struct iscsi_cls_conn *cls_conn; struct iscsi_session *sess; struct iscsi_conn *conn; DEBUG2(printk(KERN_INFO "Func: %s\n", __func__)); - ha = ddb_entry->ha; cls_sess = ddb_entry->sess; sess = cls_sess->dd_data; cls_conn = ddb_entry->conn;