From: Cezary Rojewski <cezary.rojewski@intel.com>
To: <phucduc.bui@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Shunli Wang <shunli.wang@mediatek.com>,
<cassiogabrielcontato@gmail.com>, <linux-sound@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, Mark Brown <broonie@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>
Subject: Re: [PATCH v4 2/5] ASoC: mediatek: mt8183: Fix clock handling in mux disable path
Date: Thu, 3 Sep 2026 13:00:58 +0200 [thread overview]
Message-ID: <63c61f29-5db7-4e90-8565-3d6c8a6d57b5@intel.com> (raw)
In-Reply-To: <20260903045203.175337-3-phucduc.bui@gmail.com>
On 9/3/2026 6:52 AM, phucduc.bui@gmail.com wrote:
> Changes in v4:
> - In the mux disable path, remove the goto labels so that all teardown
> steps are attempted and any errors are only reported.
>
> sound/soc/mediatek/mt8183/mt8183-afe-clk.c | 6 ------
> 1 file changed, 6 deletions(-)
> @@ -271,7 +271,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
> dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
> __func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
> aud_clks[CLK_CLK26M], ret);
> - goto EXIT;
> }
> clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
>
> @@ -281,7 +280,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
> dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
> __func__, aud_clks[CLK_TOP_MUX_AUD_1],
> aud_clks[CLK_CLK26M], ret);
> - goto EXIT;
> }
> clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
> }
> @@ -298,7 +296,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
> afe_priv->clk[CLK_CLK26M]);
> clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
> ERR_ENABLE_CLK_TOP_MUX_AUD_1:
> -EXIT:
> return ret;
> }
When looking at this again, I'd probably refactor the whole thing so we
have a permissive teardown path but still propagate the error code in
case there is a caller who does care about the result of the disable
scenario. Alas, nothing in this file ever checks the results of
apll1/2_mux_setting() so the callers needed an update too. Well, let's
just say that's a tale for a separate patchset..
TLDR: the patch is still an improvement and the (possible) refactor is a
outside of its scope.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
next prev parent reply other threads:[~2026-09-03 11:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 4:51 [PATCH v4 0/5] ASoC: mediatek: mt8183: Fix clock error handling phucduc.bui
2026-09-03 4:51 ` [PATCH v4 1/5] ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure phucduc.bui
2026-09-03 4:52 ` [PATCH v4 2/5] ASoC: mediatek: mt8183: Fix clock handling in mux disable path phucduc.bui
2026-09-03 11:00 ` Cezary Rojewski [this message]
2026-09-03 4:52 ` [PATCH v4 3/5] ASoC: mediatek: mt8183: Fix APLL enable error handling phucduc.bui
2026-09-03 4:52 ` [PATCH v4 4/5] ASoC: mediatek: mt8183: Use dev_err_probe() for " phucduc.bui
2026-09-03 4:52 ` [PATCH v4 5/5] ASoC: mediatek: mt8183: Drop redundant probe error messages phucduc.bui
2026-09-25 17:40 ` [PATCH v4 0/5] ASoC: mediatek: mt8183: Fix clock error handling Mark Brown
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=63c61f29-5db7-4e90-8565-3d6c8a6d57b5@intel.com \
--to=cezary.rojewski@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=shunli.wang@mediatek.com \
--cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.