mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	Kees Cook <kees@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Trevor Wu <trevor.wu@mediatek.com>,
	Douglas Anderson <dianders@chromium.org>,
	<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 3/7] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors
Date: Tue, 8 Sep 2026 19:49:00 +0200	[thread overview]
Message-ID: <e011cd74-7c5a-4cd1-b412-ad11765ad11c@intel.com> (raw)
In-Reply-To: <20260907120310.135693-4-phucduc.bui@gmail.com>

On 9/7/2026 2:03 PM, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
> 
> The return values from regmap_update_bits() are currently ignored
> by the clock and AFE control functions.
> Propagate the errors to allow callers to handle regmap update
> failures.
> 
> Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control")
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
>  sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
> index ecba13eda440..77511f6fba41 100644
> --- a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
> +++ b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
> @@ -564,9 +564,7 @@ static int mt8188_afe_enable_top_cg(struct mtk_base_afe *afe, unsigned int cg_ty
>  	unsigned int mask = get_top_cg_mask(cg_type);
>  	unsigned int val = get_top_cg_on_val(cg_type);
>  
> -	regmap_update_bits(afe->regmap, reg, mask, val);
> -
> -	return 0;
> +	return regmap_update_bits(afe->regmap, reg, mask, val);
>  }
>  
>  static int mt8188_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_type)
> @@ -575,9 +573,7 @@ static int mt8188_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_t
>  	unsigned int mask = get_top_cg_mask(cg_type);
>  	unsigned int val = get_top_cg_off_val(cg_type);
>  
> -	regmap_update_bits(afe->regmap, reg, mask, val);
> -
> -	return 0;
> +	return regmap_update_bits(afe->regmap, reg, mask, val);
>  }
>  
>  int mt8188_afe_enable_reg_rw_clk(struct mtk_base_afe *afe)
> @@ -617,14 +613,12 @@ int mt8188_afe_disable_reg_rw_clk(struct mtk_base_afe *afe)
>  
>  static int mt8188_afe_enable_afe_on(struct mtk_base_afe *afe)
>  {
> -	regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x1);
> -	return 0;
> +	return regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x1);
>  }
>  
>  static int mt8188_afe_disable_afe_on(struct mtk_base_afe *afe)
>  {
> -	regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x0);
> -	return 0;
> +	return regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x0);
>  }
>  
>  static int mt8188_afe_enable_a1sys(struct mtk_base_afe *afe)

I'd expect someone from Mediatek to verify this.  While I agree with the
change, some drivers follow "ignore register update result" arch and,
what was previously ignored will now cause basic operations to fail.

  reply	other threads:[~2026-09-08 17:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 12:03 [PATCH 0/7] ASoC: mediatek: mt8188: Improve error handling phucduc.bui
2026-09-07 12:03 ` [PATCH 1/7] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate clock initialization errors phucduc.bui
2026-09-07 12:03 ` [PATCH 2/7] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors phucduc.bui
2026-09-07 12:03 ` [PATCH 3/7] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors phucduc.bui
2026-09-08 17:49   ` Cezary Rojewski [this message]
2026-09-08 18:52     ` Mark Brown
2026-09-09  9:15       ` AngeloGioacchino Del Regno
2026-09-07 12:03 ` [PATCH 4/7] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors phucduc.bui
2026-09-07 12:03 ` [PATCH 5/7] ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors phucduc.bui
2026-09-07 12:03 ` [PATCH 6/7] ASoC: mediatek: mt8188: mt8188-afe-pcm: Drop redundant probe error messages phucduc.bui
2026-09-07 12:03 ` [PATCH 7/7] ASoC: mediatek: mt8188: fix clk leak on error in audsys_clk_register phucduc.bui
2026-09-08 17:54 ` [PATCH 0/7] ASoC: mediatek: mt8188: Improve error handling Cezary Rojewski
2026-09-09  9:15 ` AngeloGioacchino Del Regno
2026-09-10  4:33   ` Bui Duc Phuc

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=e011cd74-7c5a-4cd1-b412-ad11765ad11c@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=kees@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.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=tiwai@suse.com \
    --cc=trevor.wu@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®