From: Shengjiu Wang <shengjiu.wang@gmail.com>
To: cgel.zte@gmail.com
Cc: alsa-devel@alsa-project.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Xiubo Li <Xiubo.Lee@gmail.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Zeal Robot <zealci@zte.com.cn>,
Liam Girdwood <lgirdwood@gmail.com>,
Minghao Chi <chi.minghao@zte.com.cn>,
Jaroslav Kysela <perex@perex.cz>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Mark Brown <broonie@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ASoC: imx-audmux: remove unnecessary check of clk_disable_unprepare
Date: Mon, 6 Jun 2022 10:05:10 +0800 [thread overview]
Message-ID: <CAA+D8ANagLtpLHP7PpqoSEHkNkCg+Xq-j1QNzoL2SWw1ko_r5g@mail.gmail.com> (raw)
In-Reply-To: <20220602071448.277968-1-chi.minghao@zte.com.cn>
[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]
On Thu, Jun 2, 2022 at 3:14 PM <cgel.zte@gmail.com> wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Because clk_disable_unprepare already checked NULL clock
> parameter, so the additional checks are unnecessary, just remove them.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> sound/soc/fsl/imx-audmux.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
> index dfa05d40b276..f434fa7decc1 100644
> --- a/sound/soc/fsl/imx-audmux.c
> +++ b/sound/soc/fsl/imx-audmux.c
> @@ -71,8 +71,7 @@ static ssize_t audmux_read_file(struct file *file, char
> __user *user_buf,
> ptcr = readl(audmux_base + IMX_AUDMUX_V2_PTCR(port));
> pdcr = readl(audmux_base + IMX_AUDMUX_V2_PDCR(port));
>
> - if (audmux_clk)
> - clk_disable_unprepare(audmux_clk);
> + clk_disable_unprepare(audmux_clk);
>
I think the check of audmux_clk before "clk_prepare_enable" also
can be removed?
> buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
> if (!buf)
> @@ -218,8 +217,7 @@ int imx_audmux_v2_configure_port(unsigned int port,
> unsigned int ptcr,
> writel(ptcr, audmux_base + IMX_AUDMUX_V2_PTCR(port));
> writel(pdcr, audmux_base + IMX_AUDMUX_V2_PDCR(port));
>
> - if (audmux_clk)
> - clk_disable_unprepare(audmux_clk);
> + clk_disable_unprepare(audmux_clk);
>
ditto
best regards
wang shengjiu
>
> return 0;
> }
> --
> 2.25.1
>
>
>
[-- Attachment #2: Type: text/html, Size: 2656 bytes --]
prev parent reply other threads:[~2022-06-06 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 7:14 [PATCH] ASoC: imx-audmux: remove unnecessary check of clk_disable_unprepare cgel.zte
2022-06-06 2:05 ` Shengjiu Wang [this message]
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=CAA+D8ANagLtpLHP7PpqoSEHkNkCg+Xq-j1QNzoL2SWw1ko_r5g@mail.gmail.com \
--to=shengjiu.wang@gmail.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=zealci@zte.com.cn \
/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).