提交 65d272ac 编写于 作者: Y Yupeng Zhou 提交者: Xie XiuQi

hisi_sas: optimize the code convention.

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

optimize the code convention, using the slot after NULL checked.
Signed-off-by: NYupeng Zhou <zhouyupeng1@huawei.com>
Reviewed-by: Nluojian <luojian5@huawei.com>
Reviewed-by: Nchenxiang <chenxiang66@hisilicon.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 7109a3aa
...@@ -1223,11 +1223,11 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, ...@@ -1223,11 +1223,11 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) { if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {
struct hisi_sas_slot *slot = task->lldd_task; struct hisi_sas_slot *slot = task->lldd_task;
struct hisi_sas_cq *cq =
&hisi_hba->cq[slot->dlvry_queue];
dev_err(dev, "abort tmf: TMF task timeout and not done\n"); dev_err(dev, "abort tmf: TMF task timeout and not done\n");
if (slot) { if (slot) {
struct hisi_sas_cq *cq =
&hisi_hba->cq[slot->dlvry_queue];
/* /*
* flush tasklet to avoid free'ing task * flush tasklet to avoid free'ing task
* before using task in IO completion * before using task in IO completion
...@@ -2075,10 +2075,10 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, ...@@ -2075,10 +2075,10 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,
if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) { if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {
struct hisi_sas_slot *slot = task->lldd_task; struct hisi_sas_slot *slot = task->lldd_task;
struct hisi_sas_cq *cq =
&hisi_hba->cq[slot->dlvry_queue];
if (slot) { if (slot) {
struct hisi_sas_cq *cq =
&hisi_hba->cq[slot->dlvry_queue];
/* /*
* flush tasklet to avoid free'ing task * flush tasklet to avoid free'ing task
* before using task in IO completion * before using task in IO completion
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册