LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ASoC: rt5514: make array div static const, makes object smaller
@ 2021-08-01 6:40 Colin King
2021-08-03 22:35 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-01 6:40 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the array div on the stack but instead it
static const. Makes the object code smaller by 48 bytes.
Before:
text data bss dec hex filename
53894 16368 128 70390 112f6 ./sound/soc/codecs/rt5514.o
After:
text data bss dec hex filename
53750 16464 128 70342 112c6 ./sound/soc/codecs/rt5514.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/soc/codecs/rt5514.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index 7081142a355e..4b1ad5054e8d 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -494,7 +494,7 @@ static const struct snd_kcontrol_new rt5514_sto2_dmic_mux =
*/
static int rt5514_calc_dmic_clk(struct snd_soc_component *component, int rate)
{
- int div[] = {2, 3, 4, 8, 12, 16, 24, 32};
+ static const int div[] = {2, 3, 4, 8, 12, 16, 24, 32};
int i;
if (rate < 1000000 * div[0]) {
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: rt5514: make array div static const, makes object smaller
2021-08-01 6:40 [PATCH] ASoC: rt5514: make array div static const, makes object smaller Colin King
@ 2021-08-03 22:35 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-08-03 22:35 UTC (permalink / raw)
To: Liam Girdwood, Oder Chiou, Colin King, alsa-devel, Takashi Iwai,
Jaroslav Kysela
Cc: Mark Brown, linux-kernel, kernel-janitors
On Sun, 1 Aug 2021 07:40:23 +0100, Colin King wrote:
> Don't populate the array div on the stack but instead it
> static const. Makes the object code smaller by 48 bytes.
>
> Before:
> text data bss dec hex filename
> 53894 16368 128 70390 112f6 ./sound/soc/codecs/rt5514.o
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: rt5514: make array div static const, makes object smaller
commit: 5c8a7efc2fd5eb716c48d7d7ab4295effbc09ba3
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:[~2021-08-03 22:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 6:40 [PATCH] ASoC: rt5514: make array div static const, makes object smaller Colin King
2021-08-03 22:35 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).