From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8AC61C433F5 for ; Fri, 26 Nov 2021 07:34:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 830C918ED; Fri, 26 Nov 2021 08:33:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 830C918ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637912040; bh=jZxouEtAEdXNSAu22CTeKbUyWiSnqY6uTM1/cCcWB2A=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ejk/XxjlJmkEeyqwyxycNVGElNV1k0yY2B4z8lp8mFrGXGgbO04Gm68GjPv/7xxP2 EPveoR1iU+Kn1Z4NxXWaKLqKpsq71caAFBXHV9id3kztr+brwnjQfWDX7QfQ/dzFfz OTY9JTYVV7Ra40Bn4eb/TMB3Y/s6QgzdsJumdes0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 932FFF804AD; Fri, 26 Nov 2021 08:32:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 188CAF804CF; Fri, 26 Nov 2021 08:32:30 +0100 (CET) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 37533F80087 for ; Fri, 26 Nov 2021 08:32:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 37533F80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="rUX7EPkO" Received: by mail-pg1-x531.google.com with SMTP id 137so362206pgg.3 for ; Thu, 25 Nov 2021 23:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=rUX7EPkOpCeOT0XDzv3zPUO65mVufrZATtBDv60kEPRIqIXnd367uOnp27jiHhW1RH pfZDsfZurY3opAdcGf9KbD0CAfhLVt2lc23p8w5m5g7ZsI1vPM3dDlMayAl8unNLuaAi G7XpZttHEAyra0B8n1oEx1fJSRyN5ROr1twSvleukoCpfjG3iT1ywnNB2G438p+WUIys BpRXFIC11cFbUlGHe9PDWmgBInA1QAq8cAUe8RW5pHox17z+ePwRAIRe0iXrndMiPpku 1llMHJ4ZOUODS2L0ni5PspcTSM8HJ1XdmckmEqkByum9Rjj5mNFqQ6aAS4S/l9AgDrq8 E8WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=gPlLCQ7PhoeMznnWDaLzpQaup6T8B80iMDQ2fiVtWglkLfKtK8hStoo5cMphOANIbD +JW/8nu+TtoGP2LoI9vfwMYSht8yPjQFmxJpicnP+5t3ojuQDper5i9tt79DMQcYajU6 MMaZzZSs1yyuLDo/pUJtntb9yhPmCNdVfc7vW07n4DX4MPT7ZBgcTOeQjuUr+YQQmQez KRhG2zPif1Gmm19TNagfy+uMM5XY10cqZzw2xejpdjCTcCzUKWoIuaxvc2VXqK6ecnZA 4XZEzak4E+VbU3eeh5M/NBJsLcezGSfYFefbvYgN7IAaKMcsXMAqipYoivf+2ufGGhN/ gB3g== X-Gm-Message-State: AOAM5311uI1xDMSZieLnXFIKCAAKSB4dOT1Z+3EqjhW4GgVmL0CbuVfB QA3tIOE6mqFQUUoe3k7pScu0vA== X-Google-Smtp-Source: ABdhPJxBCLapsVbR8S32cbgSLGdf670vLzwnMC/H4p+iIY7hAahthtNMoj8b3XEDxeZJspFRP89tZA== X-Received: by 2002:a65:4b87:: with SMTP id t7mr19646091pgq.115.1637911941740; Thu, 25 Nov 2021 23:32:21 -0800 (PST) Received: from google.com ([2401:fa00:1:10:5eda:d984:1426:91ca]) by smtp.gmail.com with ESMTPSA id d12sm4112656pgf.19.2021.11.25.23.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 23:32:21 -0800 (PST) Date: Fri, 26 Nov 2021 15:32:17 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Subject: Re: [PATCH v5 3/3] mailbox: mediatek: add support for adsp mailbox controller Message-ID: References: <20211126071432.21990-1-allen-kh.cheng@mediatek.com> <20211126071432.21990-4-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211126071432.21990-4-allen-kh.cheng@mediatek.com> Cc: devicetree@vger.kernel.org, Linux-ALSA , Kai Vehmanen , cujomalainey@google.com, linux-kernel@vger.kernel.org, Jassi Brar , Pierre-Louis Bossart , Rob Herring , Liam Girdwood , Project_Global_Chrome_Upstream_Group@mediatek.com, Mark Brown , linux-mediatek@lists.infradead.org, Ranjani Sridharan , Matthias Brugger , Takashi Iwai , Daniel Baluta , linux-arm-kernel@lists.infradead.org, sound-open-firmware@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF16CC433F5 for ; Fri, 26 Nov 2021 07:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rUaDoQ+9lkVFz5Xc2KQ+kqryNi4LaWtQMKUvzN+5si0=; b=Ivws3Sbf6h5Sl+ zvKYmW7ccSZYfsdE4V8PEU78qFhmOaZJosr1BoGzbiiV9M778sGXhESVydD+qbp4e+nshqbs0uxJn 9jx5Nlj7bjpH0AjlD/Hd3DYcMf0ceE7c3SIwDeFGQZzPIOOg0/w8uvTOxQ5zN6LlzjrceF1sLmv7Z TCPYr8+wttqCY4ACZGCQFtLpXKvpYeDvxHFvw8nb8yHI60Q68xqJlAfq3Wuel/NI5zThI5uArZ7d3 jYesZFVLTtJ4GhOlJ4uNOWy2zWtNw590NWUYZPtXM/OijqLZix/fxOEPs18VUn9cErmd9/ikWMJOy jZmjgRQdgWSE/6BPvdRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqVic-009RZz-Fk; Fri, 26 Nov 2021 07:32:26 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqViZ-009RYm-5r for linux-mediatek@lists.infradead.org; Fri, 26 Nov 2021 07:32:24 +0000 Received: by mail-pg1-x532.google.com with SMTP id t4so7423134pgn.9 for ; Thu, 25 Nov 2021 23:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=rUX7EPkOpCeOT0XDzv3zPUO65mVufrZATtBDv60kEPRIqIXnd367uOnp27jiHhW1RH pfZDsfZurY3opAdcGf9KbD0CAfhLVt2lc23p8w5m5g7ZsI1vPM3dDlMayAl8unNLuaAi G7XpZttHEAyra0B8n1oEx1fJSRyN5ROr1twSvleukoCpfjG3iT1ywnNB2G438p+WUIys BpRXFIC11cFbUlGHe9PDWmgBInA1QAq8cAUe8RW5pHox17z+ePwRAIRe0iXrndMiPpku 1llMHJ4ZOUODS2L0ni5PspcTSM8HJ1XdmckmEqkByum9Rjj5mNFqQ6aAS4S/l9AgDrq8 E8WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=Ig5hflD6It5yMUBhaHx+O2v3UOZajpP8Z+Yz+++MGxS0SsR8jSs9mcczKGUseJ+Q2t W2aClXi8gq1PIbkTtD68hGbdYASL8sbRIUaruPo86CQaaGrAF61aRGYKSpL7iAMNQA4k Eq+cfFFAxCY+QJ5+r/ZpjNp60fwcHvW6RbYbdlWgDXka5TKcXdJ8BqNNS1fXcqmcvDVg hYYy1jmVK1QBlEjtGC8Nf4VHO6rSVvzVDsskwzi3gcnzJxIAiJHEeOGuWLm/+UIy6lvE zAkcyLLdb2LpY4WOk5QLyvX2Yr20XtykLFunR8YPw8VGc3ubqU+aC0kn1nIz5Cn+INdt 3F3A== X-Gm-Message-State: AOAM530N3ziCoX++fkkD7Lk98dlGNYU3AO1QdnjvbiTjxAwscwTLLTf/ Z5RZUVPlKd1Wu7T/k3iOhSfjXw== X-Google-Smtp-Source: ABdhPJxBCLapsVbR8S32cbgSLGdf670vLzwnMC/H4p+iIY7hAahthtNMoj8b3XEDxeZJspFRP89tZA== X-Received: by 2002:a65:4b87:: with SMTP id t7mr19646091pgq.115.1637911941740; Thu, 25 Nov 2021 23:32:21 -0800 (PST) Received: from google.com ([2401:fa00:1:10:5eda:d984:1426:91ca]) by smtp.gmail.com with ESMTPSA id d12sm4112656pgf.19.2021.11.25.23.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 23:32:21 -0800 (PST) Date: Fri, 26 Nov 2021 15:32:17 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Mark Brown , Rob Herring , Matthias Brugger , Jassi Brar , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH v5 3/3] mailbox: mediatek: add support for adsp mailbox controller Message-ID: References: <20211126071432.21990-1-allen-kh.cheng@mediatek.com> <20211126071432.21990-4-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211126071432.21990-4-allen-kh.cheng@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_233223_236983_92AD1956 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 953E6C433EF for ; Fri, 26 Nov 2021 07:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wZgS7PWO8auJIEduecXYk2MHbfak9YPB+6Au1mrYqY4=; b=en/2uJb5i6cl4g aZZnW4mL5g4WFLo4tUlqBQfotmBLR/6O1zWT84nt5FT2Qh4QL1kL94zrgvq8BsQb91efj0NqUhE0Z EU9XEpzeTyOPItpQa7RzpSk1X7Kbha9TeiTVzKUTd+b7gL4BpT9zPqBEhtwMBgfwU2rron9/a0o9/ 8xzykZL02Y9dNlUtbYpm2owZW8zup6Vr9q0T9iMjFZkZwUzM4SYB6IntBKvqu+ksKb03vs8hYRDJU VXMUFY+iAJoZU+WdtQhdcR0QmOMqqnf6f+yoO60+ONcKDSaoZn9vOz/Z2hBBFlena7xyBI8MSP3FK M9a76A5bWAjr/in5E3BA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqVie-009RaD-KT; Fri, 26 Nov 2021 07:32:28 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqViZ-009RYl-5F for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 07:32:24 +0000 Received: by mail-pf1-x433.google.com with SMTP id p13so413744pfw.2 for ; Thu, 25 Nov 2021 23:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=rUX7EPkOpCeOT0XDzv3zPUO65mVufrZATtBDv60kEPRIqIXnd367uOnp27jiHhW1RH pfZDsfZurY3opAdcGf9KbD0CAfhLVt2lc23p8w5m5g7ZsI1vPM3dDlMayAl8unNLuaAi G7XpZttHEAyra0B8n1oEx1fJSRyN5ROr1twSvleukoCpfjG3iT1ywnNB2G438p+WUIys BpRXFIC11cFbUlGHe9PDWmgBInA1QAq8cAUe8RW5pHox17z+ePwRAIRe0iXrndMiPpku 1llMHJ4ZOUODS2L0ni5PspcTSM8HJ1XdmckmEqkByum9Rjj5mNFqQ6aAS4S/l9AgDrq8 E8WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=TFq1A4nkRNTqgnP00YGFSh335lzX1S0VTwPW0xrjiqnjh+8w02HpH7zenuW2rYFFy2 Ex+52BZX8zC2ZuSVfA+94Lhw1sgjODZ78HNnxYnmKpU/SpHnjhPAmjDktf8PnPIVCrDQ fSxAz6T/ci//0DlTRmwWF7/ODJvhovCAaMF42oxDCn8TGReB6hqZ4NWk9Gv7lixAkpdI lSKXG6eBzuC3nv3i0slERvlac7KdO+pCKmR5Sd7AoNBN8ADx/Q2ajV79n7eZ8twYxZn1 wksAaKQ4iLdy68tlK1FlDG9J6KFi+MfYi/qf8wBvrlvK5tXTr6EEASjGFXUjlza0EuXi ArVw== X-Gm-Message-State: AOAM531sNCBrTJTv5Cz6nyiBmjPp332ugkWgT4Sr29gXoxDplgt/gAgm MJut5B4EXIqG8c7ikA6Pi6GEcg== X-Google-Smtp-Source: ABdhPJxBCLapsVbR8S32cbgSLGdf670vLzwnMC/H4p+iIY7hAahthtNMoj8b3XEDxeZJspFRP89tZA== X-Received: by 2002:a65:4b87:: with SMTP id t7mr19646091pgq.115.1637911941740; Thu, 25 Nov 2021 23:32:21 -0800 (PST) Received: from google.com ([2401:fa00:1:10:5eda:d984:1426:91ca]) by smtp.gmail.com with ESMTPSA id d12sm4112656pgf.19.2021.11.25.23.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 23:32:21 -0800 (PST) Date: Fri, 26 Nov 2021 15:32:17 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Mark Brown , Rob Herring , Matthias Brugger , Jassi Brar , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH v5 3/3] mailbox: mediatek: add support for adsp mailbox controller Message-ID: References: <20211126071432.21990-1-allen-kh.cheng@mediatek.com> <20211126071432.21990-4-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211126071432.21990-4-allen-kh.cheng@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_233223_241172_057B7F7E X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C779C433EF for ; Fri, 26 Nov 2021 07:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359293AbhKZHit (ORCPT ); Fri, 26 Nov 2021 02:38:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359201AbhKZHgr (ORCPT ); Fri, 26 Nov 2021 02:36:47 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82377C0613F7 for ; Thu, 25 Nov 2021 23:32:22 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id r130so8128659pfc.1 for ; Thu, 25 Nov 2021 23:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=rUX7EPkOpCeOT0XDzv3zPUO65mVufrZATtBDv60kEPRIqIXnd367uOnp27jiHhW1RH pfZDsfZurY3opAdcGf9KbD0CAfhLVt2lc23p8w5m5g7ZsI1vPM3dDlMayAl8unNLuaAi G7XpZttHEAyra0B8n1oEx1fJSRyN5ROr1twSvleukoCpfjG3iT1ywnNB2G438p+WUIys BpRXFIC11cFbUlGHe9PDWmgBInA1QAq8cAUe8RW5pHox17z+ePwRAIRe0iXrndMiPpku 1llMHJ4ZOUODS2L0ni5PspcTSM8HJ1XdmckmEqkByum9Rjj5mNFqQ6aAS4S/l9AgDrq8 E8WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/AAtVNxSEEMIS2MWinkvg2Tqw1EN5wSqX+XDPy/nWgI=; b=OSs/M5H/HQLRrWua/AwWF0tsoNCQjAXdXbwG8Fw4MNK2plTI0q0O35pJzsIpvQHbF7 ooJqOHTevA2zNApRCoHGRMpyoW63UN5CrouYeIavVHAD4BbSZjpiGKQHDnynoAtGhy+7 XKVA4UjZSffg4y13VNBvEyKDVKZPDzIyoZ77B3GcejHshDLxJZV5g5/36YzdmkTmm0Qc G2GCOcIu4UfltsH3t8FJLjg7LYTubPasuHv86VO5Ea9+eO9R+8Sfs5H2T3ZYEj8nLU7e SfzXiPhk0VONTRMDflHLyfoCCAiBrmV9rTo6cjf/wQoQXi02zSKuZIBnFPa1fH7zNSFV uXEg== X-Gm-Message-State: AOAM533nRRI0w6GcQx0L8KuCjzkDGeLqnnDssOri2gVgYBpUXhT+aMvB XpB0KpLL2z4zljCspTdziQQEvA== X-Google-Smtp-Source: ABdhPJxBCLapsVbR8S32cbgSLGdf670vLzwnMC/H4p+iIY7hAahthtNMoj8b3XEDxeZJspFRP89tZA== X-Received: by 2002:a65:4b87:: with SMTP id t7mr19646091pgq.115.1637911941740; Thu, 25 Nov 2021 23:32:21 -0800 (PST) Received: from google.com ([2401:fa00:1:10:5eda:d984:1426:91ca]) by smtp.gmail.com with ESMTPSA id d12sm4112656pgf.19.2021.11.25.23.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 23:32:21 -0800 (PST) Date: Fri, 26 Nov 2021 15:32:17 +0800 From: Tzung-Bi Shih To: "allen-kh.cheng" Cc: Mark Brown , Rob Herring , Matthias Brugger , Jassi Brar , Linux-ALSA , cujomalainey@google.com, Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , Project_Global_Chrome_Upstream_Group@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH v5 3/3] mailbox: mediatek: add support for adsp mailbox controller Message-ID: References: <20211126071432.21990-1-allen-kh.cheng@mediatek.com> <20211126071432.21990-4-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211126071432.21990-4-allen-kh.cheng@mediatek.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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.