diff options
author | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2021-03-15 02:33:21 +0300 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2021-06-26 19:39:54 +0300 |
commit | b3c0d72b092e52ae7369b52fb97f63eb2ea7f16a (patch) | |
tree | d486dea10a365344f3e671e0dd92814596c4dd26 /drivers/mailbox | |
parent | 4f0b776ef5831700fe47567f6d986be410d7b9e4 (diff) | |
download | linux-b3c0d72b092e52ae7369b52fb97f63eb2ea7f16a.tar.xz |
mailbox: mtk-cmdq: Remove cmdq_cb_status
cmdq_cb_status is an error status. Use the standard error number
instead of cmdq_cb_status to prevent status duplication.
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/mtk-cmdq-mailbox.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index 3900ea63b28d..1f2edc9521c1 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -180,7 +180,7 @@ static bool cmdq_thread_is_in_wfe(struct cmdq_thread *thread) return readl(thread->base + CMDQ_THR_WAIT_TOKEN) & CMDQ_THR_IS_WAITING; } -static void cmdq_task_exec_done(struct cmdq_task *task, enum cmdq_cb_status sta) +static void cmdq_task_exec_done(struct cmdq_task *task, int sta) { struct cmdq_task_cb *cb = &task->pkt->async_cb; struct cmdq_cb_data data; @@ -244,10 +244,10 @@ static void cmdq_thread_irq_handler(struct cmdq *cmdq, curr_task = task; if (!curr_task || curr_pa == task_end_pa - CMDQ_INST_SIZE) { - cmdq_task_exec_done(task, CMDQ_CB_NORMAL); + cmdq_task_exec_done(task, 0); kfree(task); } else if (err) { - cmdq_task_exec_done(task, CMDQ_CB_ERROR); + cmdq_task_exec_done(task, -ENOEXEC); cmdq_task_handle_error(curr_task); kfree(task); } @@ -415,7 +415,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan) list_for_each_entry_safe(task, tmp, &thread->task_busy_list, list_entry) { - cmdq_task_exec_done(task, CMDQ_CB_ERROR); + cmdq_task_exec_done(task, -ECONNABORTED); kfree(task); } @@ -453,7 +453,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout) list_entry) { cb = &task->pkt->async_cb; if (cb->cb) { - data.sta = CMDQ_CB_ERROR; + data.sta = -ECONNABORTED; data.data = cb->data; cb->cb(data); } |