From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Houlong Wei <houlong.wei@mediatek.com>,
Bibby Hsieh <bibby.hsieh@mediatek.com>,
Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 1/3] mailbox: mtk-cmdq: Remove cmdq_cb_status
Date: Wed, 19 May 2021 19:21:42 +0800 [thread overview]
Message-ID: <CAAOTY_8ASVD_kApnRmrrsA6nh3XDYAyS-u0g7jK_GF4KipT=wg@mail.gmail.com> (raw)
In-Reply-To: <20210314233323.23377-2-chunkuang.hu@kernel.org>
Hi, Jassi:
Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2021年3月15日 週一 上午7:33寫道:
>
> cmdq_cb_status is an error status. Use the standard error number
> instead of cmdq_cb_status to prevent status duplication.
How do you think about this series?
Regards,
Chun-Kuang.
>
> Cc: Jassi Brar <jassisinghbrar@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Houlong Wei <houlong.wei@mediatek.com>
> Cc: Bibby Hsieh <bibby.hsieh@mediatek.com>
> Cc: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mediatek@lists.infradead.org
> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> ---
> drivers/mailbox/mtk-cmdq-mailbox.c | 10 +++++-----
> include/linux/mailbox/mtk-cmdq-mailbox.h | 7 +------
> 2 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 5665b6ea8119..3d37c1cd40f1 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);
> }
> diff --git a/include/linux/mailbox/mtk-cmdq-mailbox.h b/include/linux/mailbox/mtk-cmdq-mailbox.h
> index d5a983d65f05..2f7d9a37d611 100644
> --- a/include/linux/mailbox/mtk-cmdq-mailbox.h
> +++ b/include/linux/mailbox/mtk-cmdq-mailbox.h
> @@ -65,13 +65,8 @@ enum cmdq_code {
> CMDQ_CODE_LOGIC = 0xa0,
> };
>
> -enum cmdq_cb_status {
> - CMDQ_CB_NORMAL = 0,
> - CMDQ_CB_ERROR
> -};
> -
> struct cmdq_cb_data {
> - enum cmdq_cb_status sta;
> + int sta;
> void *data;
> };
>
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-19 12:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 23:33 [PATCH 0/3] Refine mtk-cmdq-mailbox callback mechanism Chun-Kuang Hu
2021-03-14 23:33 ` [PATCH 1/3] mailbox: mtk-cmdq: Remove cmdq_cb_status Chun-Kuang Hu
2021-05-19 11:21 ` Chun-Kuang Hu [this message]
2021-05-20 13:55 ` Jassi Brar
2021-06-17 9:06 ` Chun-Kuang Hu
2021-05-26 6:15 ` Chun-Kuang Hu
2021-05-26 6:51 ` Yongqiang Niu
2021-03-14 23:33 ` [PATCH 2/3] mailbox: mtk-cmdq: Use mailbox rx_callback Chun-Kuang Hu
2021-05-26 6:17 ` Chun-Kuang Hu
2021-05-26 6:51 ` Yongqiang Niu
2021-03-14 23:33 ` [PATCH 3/3] mailbox: mtk-cmdq: Add struct cmdq_pkt in struct cmdq_cb_data Chun-Kuang Hu
2021-05-26 6:18 ` Chun-Kuang Hu
2021-05-26 6:51 ` Yongqiang Niu
2021-04-03 2:42 ` [PATCH 0/3] Refine mtk-cmdq-mailbox callback mechanism Chun-Kuang Hu
2021-05-26 6:13 ` Chun-Kuang Hu
2021-05-26 6:34 ` Yongqiang Niu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAOTY_8ASVD_kApnRmrrsA6nh3XDYAyS-u0g7jK_GF4KipT=wg@mail.gmail.com' \
--to=chunkuang.hu@kernel.org \
--cc=bibby.hsieh@mediatek.com \
--cc=dennis-yc.hsieh@mediatek.com \
--cc=houlong.wei@mediatek.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).