Commit 4aca8fe7 authored by Chen Zhou's avatar Chen Zhou Committed by Martin K. Petersen

scsi: ibmvscsi_tgt: remove set but not used variables 'iue' and 'sd'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function ibmvscsis_send_messages:
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1888:19: warning: variable iue set but not used [-Wunused-but-set-variable]
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function ibmvscsis_queue_data_in:
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3806:8: warning: variable sd set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20191213064042.161840-1-chenzhou10@huawei.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarChen Zhou <chenzhou10@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 08fcc87b
...@@ -1877,7 +1877,6 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi) ...@@ -1877,7 +1877,6 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi)
*/ */
struct viosrp_crq *crq = (struct viosrp_crq *)&msg_hi; struct viosrp_crq *crq = (struct viosrp_crq *)&msg_hi;
struct ibmvscsis_cmd *cmd, *nxt; struct ibmvscsis_cmd *cmd, *nxt;
struct iu_entry *iue;
long rc = ADAPT_SUCCESS; long rc = ADAPT_SUCCESS;
bool retry = false; bool retry = false;
...@@ -1931,8 +1930,6 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi) ...@@ -1931,8 +1930,6 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi)
*/ */
vscsi->credit += 1; vscsi->credit += 1;
} else { } else {
iue = cmd->iue;
crq->valid = VALID_CMD_RESP_EL; crq->valid = VALID_CMD_RESP_EL;
crq->format = cmd->rsp.format; crq->format = cmd->rsp.format;
...@@ -3796,7 +3793,6 @@ static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd) ...@@ -3796,7 +3793,6 @@ static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd)
se_cmd); se_cmd);
struct iu_entry *iue = cmd->iue; struct iu_entry *iue = cmd->iue;
struct scsi_info *vscsi = cmd->adapter; struct scsi_info *vscsi = cmd->adapter;
char *sd;
uint len = 0; uint len = 0;
int rc; int rc;
...@@ -3804,7 +3800,6 @@ static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd) ...@@ -3804,7 +3800,6 @@ static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd)
1); 1);
if (rc) { if (rc) {
dev_err(&vscsi->dev, "srp_transfer_data failed: %d\n", rc); dev_err(&vscsi->dev, "srp_transfer_data failed: %d\n", rc);
sd = se_cmd->sense_buffer;
se_cmd->scsi_sense_length = 18; se_cmd->scsi_sense_length = 18;
memset(se_cmd->sense_buffer, 0, se_cmd->scsi_sense_length); memset(se_cmd->sense_buffer, 0, se_cmd->scsi_sense_length);
/* Logical Unit Communication Time-out asc/ascq = 0x0801 */ /* Logical Unit Communication Time-out asc/ascq = 0x0801 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment