From: "Rangankar, Manish" <Manish.Rangankar@cavium.com>
To: Christos Gkekas <chris.gekas@gmail.com>,
Dept-Eng QLogic Storage Upstream
<QLogic-Storage-Upstream@cavium.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: qedi: Delete redundant variables
Date: Mon, 16 Oct 2017 05:37:51 +0000 [thread overview]
Message-ID: <D60A434B.3F295%manish.rangankar@cavium.com> (raw)
In-Reply-To: <1507983478-23083-1-git-send-email-chris.gekas@gmail.com>
On 14/10/17 5:47 PM, "Christos Gkekas" <chris.gekas@gmail.com> wrote:
>Remove redundant variables in quedi_fw.c that are set but not used.
>
>Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
>---
> 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];
>--
>2.7.4
Thanks for the patch.
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
next prev parent reply other threads:[~2017-10-16 5:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-14 12:17 Christos Gkekas
2017-10-16 5:37 ` Rangankar, Manish [this message]
2017-10-17 3:25 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D60A434B.3F295%manish.rangankar@cavium.com \
--to=manish.rangankar@cavium.com \
--cc=QLogic-Storage-Upstream@cavium.com \
--cc=chris.gekas@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome