[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <asrczgrmisaqzhin37jzgylm6ez2mlxtsbe6qp5mqgfecprup4@yb32qzna367s>
Date: Mon, 20 Oct 2025 14:15:06 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Alexey Klimov <alexey.klimov@...aro.org>
Cc: broonie@...nel.org, gregkh@...uxfoundation.org, srini@...nel.org,
rafael@...nel.org, dakr@...nel.org, make24@...as.ac.cn, steev@...i.org,
linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
linux-arm-msm@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] regmap: slimbus: fix bus_context pointer in
__devm_regmap_init_slimbus
On Mon, Oct 20, 2025 at 02:55:57AM +0100, Alexey Klimov wrote:
> Commit 4e65bda8273c ("ASoC: wcd934x: fix error handling in
> wcd934x_codec_parse_data()") revealed the problem in slimbus regmap.
> That commit breaks audio playback, for instance, on sdm845 Thundercomm
> Dragonboard 845c board:
>
>
> The __devm_regmap_init_slimbus() started to be used instead of
> __regmap_init_slimbus() after the commit mentioned above and turns out
> the incorrect bus_context pointer (3rd argument) was used in
> __devm_regmap_init_slimbus(). It should be &slimbus->dev. Correct it.
> The wcd934x codec seems to be the only (or the first) user of
> devm_regmap_init_slimbus() but we should fix till the point where
> __devm_regmap_init_slimbus() was introduced therefore two "Fixes" tags.
>
> Fixes: 4e65bda8273c ("ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()")
> Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support")
> Cc: stable@...r.kernel.org
> Cc: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
> Cc: Ma Ke <make24@...as.ac.cn>
> Cc: Steev Klimaszewski <steev@...i.org>
> Cc: Srinivas Kandagatla <srini@...nel.org>
> Signed-off-by: Alexey Klimov <alexey.klimov@...aro.org>
> ---
>
> The patch/fix is for the current 6.18 development cycle
> since it is fixes the regression introduced in 6.18.0-rc1.
>
> drivers/base/regmap/regmap-slimbus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/regmap/regmap-slimbus.c b/drivers/base/regmap/regmap-slimbus.c
> index 54eb7d227cf4..edfee18fbea1 100644
> --- a/drivers/base/regmap/regmap-slimbus.c
> +++ b/drivers/base/regmap/regmap-slimbus.c
> @@ -63,7 +63,7 @@ struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
> if (IS_ERR(bus))
> return ERR_CAST(bus);
>
> - return __devm_regmap_init(&slimbus->dev, bus, &slimbus, config,
> + return __devm_regmap_init(&slimbus->dev, bus, &slimbus->dev, config,
Looking at regmap_slimbus_write(), the correct bus context should be
just 'slimbus' (which is equal to '&slimbus->dev', because dev is the
first field in struct slimbus_device. So, while the patch is correct,
I'd suggest just passing slimbus (and fixing __regmap_init_slimbus()
too).
> lock_key, lock_name);
> }
> EXPORT_SYMBOL_GPL(__devm_regmap_init_slimbus);
> --
> 2.47.3
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists