Skip to contentSkip to conversation

ASoC: codecs: wcd934x: make read-only array minCode_param static const

PATCH In review Colin Ian King 2 participants 2 messages Aug 21, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: codecs: wcd934x: make read-only array minCode_param static const

Don't populate the read-only array minCode_param on the stack at run time, instead make it static const.

---
 sound/soc/codecs/wcd934x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wcd934x.c +2 -2
index 291d0c80a6fc..910852eb9698 100644
@@ -2643,8 +2643,8 @@ static void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x,
 	s16 c1;
 	s32 x1, d1;
 	int32_t denom;
-	int minCode_param[] = {
-			3277, 1639, 820, 410, 205, 103, 52, 26
+	static const int minCode_param[] = {
+		3277, 1639, 820, 410, 205, 103, 52, 26
 	};
 
 	regmap_update_bits(wcd934x->regmap, WCD934X_ANA_MBHC_ZDET, 0x20, 0x20);
Signature · 1 line
2.39.2
maintainer
#1 lore raw
Quoted 4 lines · Colin Ian King

Don't populate the read-only array minCode_param on the stack at run time, instead make it static const.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: wcd934x: make read-only array minCode_param static const

      commit: 6f6d8b2d49299492e704030632ab79257685e5d3

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark