2021-11-26 07:35:20

by Tzung-Bi Shih

[permalink] [raw]
Subject: Re: [PATCH v5 3/3] mailbox: mediatek: add support for adsp mailbox controller

On Fri, Nov 26, 2021 at 03:14:32PM +0800, allen-kh.cheng wrote:
> diff --git a/drivers/mailbox/mtk-adsp-mailbox.c b/drivers/mailbox/mtk-adsp-mailbox.c
[...]
> +static bool mtk_adsp_mbox_last_tx_done(struct mbox_chan *chan)
> +{
> + struct adsp_mbox_ch_info *ch_info = chan->con_priv;
> + void __iomem *reg = ch_info->va_reg;
> +
> + return readl(reg + MTK_ADSP_MBOX_IN_CMD) == 0 ? true : false;

The expression "readl(...) == 0" should be already a boolean.