Commit e4020e08 authored by Lee Jones's avatar Lee Jones Committed by Martin K. Petersen

scsi: qedi: Remove 2 set but unused variables

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qedi/qedi_main.c: In function ‘qedi_queue_cqe’:
 drivers/scsi/qedi/qedi_main.c:1158:21: warning: variable ‘conn’ set but not used [-Wunused-but-set-variable]
 1158 | struct iscsi_conn *conn;
 | ^~~~
 drivers/scsi/qedi/qedi_main.c: In function ‘__qedi_probe’:
 drivers/scsi/qedi/qedi_main.c:2432:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
 2432 | u16 tmp;
 | ^~~

Link: https://lore.kernel.org/r/20200723122446.1329773-12-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@cavium.com
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7106de1d
...@@ -1155,7 +1155,6 @@ static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe, ...@@ -1155,7 +1155,6 @@ static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe,
{ {
struct qedi_work *qedi_work; struct qedi_work *qedi_work;
struct qedi_conn *q_conn; struct qedi_conn *q_conn;
struct iscsi_conn *conn;
struct qedi_cmd *qedi_cmd; struct qedi_cmd *qedi_cmd;
u32 iscsi_cid; u32 iscsi_cid;
int rc = 0; int rc = 0;
...@@ -1168,7 +1167,6 @@ static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe, ...@@ -1168,7 +1167,6 @@ static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe,
iscsi_cid); iscsi_cid);
return -1; return -1;
} }
conn = q_conn->cls_conn->dd_data;
switch (cqe->cqe_common.cqe_type) { switch (cqe->cqe_common.cqe_type) {
case ISCSI_CQE_TYPE_SOLICITED: case ISCSI_CQE_TYPE_SOLICITED:
...@@ -2429,7 +2427,6 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) ...@@ -2429,7 +2427,6 @@ static int __qedi_probe(struct pci_dev *pdev, int mode)
struct qed_probe_params qed_params; struct qed_probe_params qed_params;
void *task_start, *task_end; void *task_start, *task_end;
int rc; int rc;
u16 tmp;
if (mode != QEDI_MODE_RECOVERY) { if (mode != QEDI_MODE_RECOVERY) {
qedi = qedi_host_alloc(pdev); qedi = qedi_host_alloc(pdev);
...@@ -2528,9 +2525,9 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) ...@@ -2528,9 +2525,9 @@ static int __qedi_probe(struct pci_dev *pdev, int mode)
"Writing %d to primary and secondary BDQ doorbell registers.\n", "Writing %d to primary and secondary BDQ doorbell registers.\n",
qedi->bdq_prod_idx); qedi->bdq_prod_idx);
writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod); writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod);
tmp = readw(qedi->bdq_primary_prod); readw(qedi->bdq_primary_prod);
writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod); writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod);
tmp = readw(qedi->bdq_secondary_prod); readw(qedi->bdq_secondary_prod);
ether_addr_copy(qedi->mac, qedi->dev_info.common.hw_mac); ether_addr_copy(qedi->mac, qedi->dev_info.common.hw_mac);
QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "MAC address is %pM.\n", QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "MAC address is %pM.\n",
......
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