From patchwork Sat Oct 14 12:17:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 10006381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AF5916037E for ; Sat, 14 Oct 2017 12:18:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D3EF28575 for ; Sat, 14 Oct 2017 12:18:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90C0A291E8; Sat, 14 Oct 2017 12:18:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1686529173 for ; Sat, 14 Oct 2017 12:18:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753047AbdJNMSF (ORCPT ); Sat, 14 Oct 2017 08:18:05 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54671 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbdJNMSE (ORCPT ); Sat, 14 Oct 2017 08:18:04 -0400 Received: by mail-wm0-f68.google.com with SMTP id i124so26026499wmf.3; Sat, 14 Oct 2017 05:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uv/ZVZIaZWnlMAsUrIDPg3U93dz8S/fe6HWSnnTrfO0=; b=aq1oPnnSi/9B1w7wjwd5nMIjXBQcaM8VLqor5XrgLZOeFPHlLzxly+ccUV4fa3ZUA0 inLd4Gf5aUfRuSsyi+dfolSAFCO4KTHwhcDQ0Z2B2XQFlNhe4oxitQMEzFM9WCYM4vc9 eZK8sBXKlNHGoOuq/pBBRNReBDfMVklixgQJb8bi2kb+ht9geDb1ILoCCF/WMsPOFVMq /2B2WKek8HaWLfDyJwbJyIkFjSTlQVQBVYtuY2/4HMTwczCteo++zHZFzVcsvupfKWtE P5eJEw9wlYYZ65bjbtBPyICarSKFTw8WxQVKkg6Ppqi4dvjtvGy1cvvD6PtGMUm/hX5R Mg/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uv/ZVZIaZWnlMAsUrIDPg3U93dz8S/fe6HWSnnTrfO0=; b=bOcG2+V+BEQl5hFwamFwh98OlCKFpY7FW/BXaqKu9Z2YU0mKHPTTH3i5884LmtoUPr Ek91PIeAa7K9aoFF43gMX3ug8UV8iu8p6OktT/BAsnqH9pNrdN6LfcVW9lxhkgkVnBEF 9keO4LEET8MMMv41OZXHC/vV+zf8AX7XmUFXtUSQpmTrhcNU2oq88jAafmwjcLQXTbpX +dSfhMW2+Io7iV1/NpY3Cx1VsXUuNfa1eJbAin68P/07RfUFHCs6hX99mjj0gGT42XJQ VO35aJ8qapi0ANhfowBYPp0YmsK/FYS3EiVnwqLjBkELxXUn0RJmed1+s0bcRw2tU/rW 7iTQ== X-Gm-Message-State: AMCzsaUJvtsyRpmgskL+0heftWjFFsjLwvsmPzfl0Tk0hdzLGt00Fva5 WyEV1yeTzouG3bX+TovulGU= X-Google-Smtp-Source: ABhQp+Q2fGtdQEyd/H1OVX1xcTkEcbFRf6ftSiEEQgwLux5PeLJWAMafOwL14fZAmR5reG7d9Xg4pQ== X-Received: by 10.28.132.73 with SMTP id g70mr3275175wmd.33.1507983481146; Sat, 14 Oct 2017 05:18:01 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:4c41:282:53db:800d]) by smtp.gmail.com with ESMTPSA id o24sm4569557wmi.39.2017.10.14.05.18.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 05:18:00 -0700 (PDT) From: Christos Gkekas To: QLogic-Storage-Upstream@cavium.com, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] scsi: qedi: Delete redundant variables Date: Sat, 14 Oct 2017 13:17:58 +0100 Message-Id: <1507983478-23083-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove redundant variables in quedi_fw.c that are set but not used. Signed-off-by: Christos Gkekas Acked-by: Manish Rangankar --- drivers/scsi/qedi/qedi_fw.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index 93d54ac..bd302d3 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -92,7 +92,6 @@ static void qedi_process_text_resp(struct qedi_ctx *qedi, struct iscsi_text_response_hdr *cqe_text_response; struct qedi_cmd *cmd; int pld_len; - u32 *tmp; cmd = (struct qedi_cmd *)task->dd_data; task_ctx = qedi_get_task_mem(&qedi->tasks, cmd->task_id); @@ -108,7 +107,6 @@ static void qedi_process_text_resp(struct qedi_ctx *qedi, hton24(resp_hdr_ptr->dlength, (cqe_text_response->hdr_second_dword & ISCSI_TEXT_RESPONSE_HDR_DATA_SEG_LEN_MASK)); - tmp = (u32 *)resp_hdr_ptr->dlength; resp_hdr_ptr->itt = build_itt(cqe->cqe_solicited.itid, conn->session->age); @@ -196,7 +194,6 @@ static void qedi_process_tmf_resp(struct qedi_ctx *qedi, struct iscsi_tm_rsp *resp_hdr_ptr; struct iscsi_tm *tmf_hdr; struct qedi_cmd *qedi_cmd = NULL; - u32 *tmp; cqe_tmp_response = &cqe->cqe_common.iscsi_hdr.tmf_response; @@ -222,7 +219,6 @@ static void qedi_process_tmf_resp(struct qedi_ctx *qedi, hton24(resp_hdr_ptr->dlength, (cqe_tmp_response->hdr_second_dword & ISCSI_TMF_RESPONSE_HDR_DATA_SEG_LEN_MASK)); - tmp = (u32 *)resp_hdr_ptr->dlength; resp_hdr_ptr->itt = build_itt(cqe->cqe_solicited.itid, conn->session->age); resp_hdr_ptr->statsn = cpu_to_be32(cqe_tmp_response->stat_sn); @@ -269,7 +265,6 @@ static void qedi_process_login_resp(struct qedi_ctx *qedi, struct iscsi_login_response_hdr *cqe_login_response; struct qedi_cmd *cmd; int pld_len; - u32 *tmp; cmd = (struct qedi_cmd *)task->dd_data; @@ -286,7 +281,6 @@ static void qedi_process_login_resp(struct qedi_ctx *qedi, hton24(resp_hdr_ptr->dlength, (cqe_login_response->hdr_second_dword & ISCSI_LOGIN_RESPONSE_HDR_DATA_SEG_LEN_MASK)); - tmp = (u32 *)resp_hdr_ptr->dlength; resp_hdr_ptr->itt = build_itt(cqe->cqe_solicited.itid, conn->session->age); resp_hdr_ptr->tsih = cqe_login_response->tsih; @@ -590,7 +584,6 @@ static void qedi_scsi_completion(struct qedi_ctx *qedi, int datalen = 0; struct qedi_conn *qedi_conn; u32 iscsi_cid; - bool mark_cmd_node_deleted = false; u8 cqe_err_bits = 0; iscsi_cid = cqe->cqe_common.conn_id; @@ -674,7 +667,6 @@ static void qedi_scsi_completion(struct qedi_ctx *qedi, cmd->io_cmd_in_list = false; list_del_init(&cmd->io_cmd); qedi_conn->active_cmd_count--; - mark_cmd_node_deleted = true; } spin_unlock(&qedi_conn->list_lock); @@ -763,7 +755,7 @@ static void qedi_process_cmd_cleanup_resp(struct qedi_ctx *qedi, u32 rtid = 0; u32 iscsi_cid; struct qedi_conn *qedi_conn; - struct qedi_cmd *cmd_new, *dbg_cmd; + struct qedi_cmd *dbg_cmd; struct iscsi_task *mtask; struct iscsi_tm *tmf_hdr = NULL; @@ -856,7 +848,6 @@ static void qedi_process_cmd_cleanup_resp(struct qedi_ctx *qedi, } qedi_conn->cmd_cleanup_cmpl++; wake_up(&qedi_conn->wait_queue); - cmd_new = task->dd_data; QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_TID, "Freeing tid=0x%x for cid=0x%x\n", @@ -1029,7 +1020,6 @@ int qedi_send_iscsi_login(struct qedi_conn *qedi_conn, struct iscsi_task_context *fw_task_ctx; struct qedi_ctx *qedi = qedi_conn->qedi; struct iscsi_login_req *login_hdr; - struct scsi_sge *req_sge = NULL; struct scsi_sge *resp_sge = NULL; struct qedi_cmd *qedi_cmd; struct qedi_endpoint *ep; @@ -1037,7 +1027,6 @@ int qedi_send_iscsi_login(struct qedi_conn *qedi_conn, u16 sq_idx = 0; int rval = 0; - req_sge = (struct scsi_sge *)qedi_conn->gen_pdu.req_bd_tbl; resp_sge = (struct scsi_sge *)qedi_conn->gen_pdu.resp_bd_tbl; qedi_cmd = (struct qedi_cmd *)task->dd_data; ep = qedi_conn->ep; @@ -1718,7 +1707,6 @@ int qedi_send_iscsi_nopout(struct qedi_conn *qedi_conn, struct qedi_ctx *qedi = qedi_conn->qedi; struct iscsi_task_context *fw_task_ctx; struct iscsi_nopout *nopout_hdr; - struct scsi_sge *req_sge = NULL; struct scsi_sge *resp_sge = NULL; struct qedi_cmd *qedi_cmd; struct qedi_endpoint *ep; @@ -1727,7 +1715,6 @@ int qedi_send_iscsi_nopout(struct qedi_conn *qedi_conn, u16 sq_idx = 0; int rval = 0; - req_sge = (struct scsi_sge *)qedi_conn->gen_pdu.req_bd_tbl; resp_sge = (struct scsi_sge *)qedi_conn->gen_pdu.resp_bd_tbl; qedi_cmd = (struct qedi_cmd *)task->dd_data; nopout_hdr = (struct iscsi_nopout *)task->hdr; @@ -1995,7 +1982,6 @@ void qedi_trace_io(struct qedi_ctx *qedi, struct iscsi_task *task, struct qedi_conn *qedi_conn = conn->dd_data; struct scsi_cmnd *sc_cmd = task->sc; unsigned long flags; - u8 op; spin_lock_irqsave(&qedi->io_trace_lock, flags); @@ -2005,7 +1991,6 @@ void qedi_trace_io(struct qedi_ctx *qedi, struct iscsi_task *task, io_log->cid = qedi_conn->iscsi_conn_id; io_log->lun = sc_cmd->device->lun; io_log->op = sc_cmd->cmnd[0]; - op = sc_cmd->cmnd[0]; io_log->lba[0] = sc_cmd->cmnd[2]; io_log->lba[1] = sc_cmd->cmnd[3]; io_log->lba[2] = sc_cmd->cmnd[4];