* [PATCH] ASoC: twl4030: make read-only array ramp_base static const
@ 2022-10-18 15:29 Colin Ian King
2022-10-19 12:05 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-18 15:29 UTC (permalink / raw)
To: Peter Ujfalusi, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
Don't populate the read-only array ramp_base on the stack but
instead make it static const. Also makes the object code a
little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
sound/soc/codecs/twl4030.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index e48768233e20..9c50ac356c89 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -700,8 +700,10 @@ static void headset_ramp(struct snd_soc_component *component, int ramp)
struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component);
struct twl4030_board_params *board_params = twl4030->board_params;
/* Base values for ramp delay calculation: 2^19 - 2^26 */
- unsigned int ramp_base[] = {524288, 1048576, 2097152, 4194304,
- 8388608, 16777216, 33554432, 67108864};
+ static const unsigned int ramp_base[] = {
+ 524288, 1048576, 2097152, 4194304,
+ 8388608, 16777216, 33554432, 67108864
+ };
unsigned int delay;
hs_gain = twl4030_read(component, TWL4030_REG_HS_GAIN_SET);
--
2.37.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: twl4030: make read-only array ramp_base static const
2022-10-18 15:29 [PATCH] ASoC: twl4030: make read-only array ramp_base static const Colin Ian King
@ 2022-10-19 12:05 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-10-19 12:05 UTC (permalink / raw)
To: Liam Girdwood, alsa-devel, Colin Ian King, Peter Ujfalusi,
Takashi Iwai, Jaroslav Kysela
Cc: kernel-janitors, linux-kernel
On Tue, 18 Oct 2022 16:29:28 +0100, Colin Ian King wrote:
> Don't populate the read-only array ramp_base on the stack but
> instead make it static const. Also makes the object code a
> little smaller.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: twl4030: make read-only array ramp_base static const
commit: 67860d2a8e0db7783f680f6f1c1600ed34ed3a97
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-19 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 15:29 [PATCH] ASoC: twl4030: make read-only array ramp_base static const Colin Ian King
2022-10-19 12:05 ` Mark Brown
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®