Commit 36996a1e authored by Xiang Chen's avatar Xiang Chen Committed by Martin K. Petersen

scsi: hisi_sas: remove unused variable hisi_sas_devices.running_req

The structure element hisi_sas_devices.running_req to count how many
commands are active is in effect only ever written in the code, so remove
it.
Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bb9abc4a
...@@ -175,7 +175,6 @@ struct hisi_sas_device { ...@@ -175,7 +175,6 @@ struct hisi_sas_device {
struct hisi_sas_dq *dq; struct hisi_sas_dq *dq;
struct list_head list; struct list_head list;
u64 attached_phy; u64 attached_phy;
atomic64_t running_req;
enum sas_device_type dev_type; enum sas_device_type dev_type;
int device_id; int device_id;
int sata_idx; int sata_idx;
......
...@@ -200,8 +200,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, ...@@ -200,8 +200,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task,
if (task) { if (task) {
struct device *dev = hisi_hba->dev; struct device *dev = hisi_hba->dev;
struct domain_device *device = task->dev;
struct hisi_sas_device *sas_dev = device->lldd_dev;
if (!task->lldd_task) if (!task->lldd_task)
return; return;
...@@ -213,9 +211,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, ...@@ -213,9 +211,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task,
dma_unmap_sg(dev, task->scatter, dma_unmap_sg(dev, task->scatter,
task->num_scatter, task->num_scatter,
task->data_dir); task->data_dir);
if (sas_dev)
atomic64_dec(&sas_dev->running_req);
} }
if (slot->buf) if (slot->buf)
...@@ -431,8 +426,6 @@ static int hisi_sas_task_prep(struct sas_task *task, struct hisi_sas_dq ...@@ -431,8 +426,6 @@ static int hisi_sas_task_prep(struct sas_task *task, struct hisi_sas_dq
spin_unlock_irqrestore(&task->task_state_lock, flags); spin_unlock_irqrestore(&task->task_state_lock, flags);
dq->slot_prep = slot; dq->slot_prep = slot;
atomic64_inc(&sas_dev->running_req);
++(*pass); ++(*pass);
return 0; return 0;
...@@ -1517,8 +1510,6 @@ hisi_sas_internal_abort_task_exec(struct hisi_hba *hisi_hba, int device_id, ...@@ -1517,8 +1510,6 @@ hisi_sas_internal_abort_task_exec(struct hisi_hba *hisi_hba, int device_id,
dq->slot_prep = slot; dq->slot_prep = slot;
atomic64_inc(&sas_dev->running_req);
/* send abort command to the chip */ /* send abort command to the chip */
hisi_hba->hw->start_delivery(dq); hisi_hba->hw->start_delivery(dq);
spin_unlock_irqrestore(&dq->lock, flags_dq); spin_unlock_irqrestore(&dq->lock, flags_dq);
......
...@@ -1407,9 +1407,6 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba, ...@@ -1407,9 +1407,6 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
} }
out: out:
if (sas_dev)
atomic64_dec(&sas_dev->running_req);
hisi_sas_slot_task_free(hisi_hba, task, slot); hisi_sas_slot_task_free(hisi_hba, task, slot);
sts = ts->stat; sts = ts->stat;
......
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