diff mbox series

mailbox: Remove WARN_ON for async_cb.cb in cmdq_exec_done

Message ID 20210929070807.4488-1-jason-jh.lin@mediatek.com (mailing list archive)
State New, archived
Headers show
Series mailbox: Remove WARN_ON for async_cb.cb in cmdq_exec_done | expand

Commit Message

Jason-JH Lin (林睿祥) Sept. 29, 2021, 7:08 a.m. UTC
Because mtk_drm_crtc_update_config is not using cmdq_pkt_flush_async,
it won't have pkt->async_cb.cb anymore.

So remove the WARN_ON check of pkt->async_cb.cb at cmdq_exec_done.

Fixes: 1b6b0ce2240e ("mailbox: mtk-cmdq: Use mailbox rx_callback")
Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com>
---
 drivers/mailbox/mtk-cmdq-mailbox.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Chun-Kuang Hu Sept. 29, 2021, 2:57 p.m. UTC | #1
Hi, Jason:

jason-jh.lin <jason-jh.lin@mediatek.com> 於 2021年9月29日 週三 下午3:08寫道:
>
> Because mtk_drm_crtc_update_config is not using cmdq_pkt_flush_async,
> it won't have pkt->async_cb.cb anymore.
>
> So remove the WARN_ON check of pkt->async_cb.cb at cmdq_exec_done.

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Fixes: 1b6b0ce2240e ("mailbox: mtk-cmdq: Use mailbox rx_callback")
> Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com>
> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 64175a893312..c591dab9d5a4 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -195,7 +195,6 @@ 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;
>
> -       WARN_ON(cb->cb == (cmdq_async_flush_cb)NULL);
>         data.sta = sta;
>         data.data = cb->data;
>         data.pkt = task->pkt;
> --
> 2.18.0
>
Enric Balletbo Serra Sept. 30, 2021, 7 a.m. UTC | #2
Hi Jason,

Thank you for your patch.

Missatge de jason-jh.lin <jason-jh.lin@mediatek.com> del dia dc., 29
de set. 2021 a les 9:08:
>
> Because mtk_drm_crtc_update_config is not using cmdq_pkt_flush_async,
> it won't have pkt->async_cb.cb anymore.
>
> So remove the WARN_ON check of pkt->async_cb.cb at cmdq_exec_done.
>
> Fixes: 1b6b0ce2240e ("mailbox: mtk-cmdq: Use mailbox rx_callback")
> Signed-off-by: jason-jh.lin <jason-jh.lin@mediatek.com>

As expected this removes the annoying "false" warning on the Mediatek
devices I tested.

Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

Thanks,
  Enric


> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 64175a893312..c591dab9d5a4 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -195,7 +195,6 @@ 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;
>
> -       WARN_ON(cb->cb == (cmdq_async_flush_cb)NULL);
>         data.sta = sta;
>         data.data = cb->data;
>         data.pkt = task->pkt;
> --
> 2.18.0
>
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
diff mbox series

Patch

diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 64175a893312..c591dab9d5a4 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -195,7 +195,6 @@  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;
 
-	WARN_ON(cb->cb == (cmdq_async_flush_cb)NULL);
 	data.sta = sta;
 	data.data = cb->data;
 	data.pkt = task->pkt;