* [PATCH] ASoC: rt1305: make array pd static const, makes object smaller
@ 2019-09-07 7:41 Colin King
2019-09-09 10:07 ` Applied "ASoC: rt1305: make array pd static const, makes object smaller" to the asoc tree Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-09-07 7:41 UTC (permalink / raw)
To: Bard Liao, 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 pd on the stack but instead make it
static const. Makes the object code smaller by 93 bytes.
Before:
text data bss dec hex filename
38961 9784 64 48809 bea9 sound/soc/codecs/rt1305.o
After:
text data bss dec hex filename
38804 9848 64 48716 be4c sound/soc/codecs/rt1305.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/soc/codecs/rt1305.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c
index 9909369483f0..e27742abfa76 100644
--- a/sound/soc/codecs/rt1305.c
+++ b/sound/soc/codecs/rt1305.c
@@ -608,7 +608,8 @@ static const struct snd_soc_dapm_route rt1305_dapm_routes[] = {
static int rt1305_get_clk_info(int sclk, int rate)
{
- int i, pd[] = {1, 2, 3, 4, 6, 8, 12, 16};
+ int i;
+ static const int pd[] = {1, 2, 3, 4, 6, 8, 12, 16};
if (sclk <= 0 || rate <= 0)
return -EINVAL;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Applied "ASoC: rt1305: make array pd static const, makes object smaller" to the asoc tree
2019-09-07 7:41 [PATCH] ASoC: rt1305: make array pd static const, makes object smaller Colin King
@ 2019-09-09 10:07 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2019-09-09 10:07 UTC (permalink / raw)
To: Colin Ian King
Cc: alsa-devel, Bard Liao, Jaroslav Kysela, kernel-janitors,
Liam Girdwood, linux-kernel, Mark Brown, Oder Chiou,
Takashi Iwai
The patch
ASoC: rt1305: make array pd static const, makes object smaller
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
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
From b61b1e35ed06db180968cb5ca0fbf8b8887ccb93 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Sat, 7 Sep 2019 08:41:56 +0100
Subject: [PATCH] ASoC: rt1305: make array pd static const, makes object
smaller
Don't populate the array pd on the stack but instead make it
static const. Makes the object code smaller by 93 bytes.
Before:
text data bss dec hex filename
38961 9784 64 48809 bea9 sound/soc/codecs/rt1305.o
After:
text data bss dec hex filename
38804 9848 64 48716 be4c sound/soc/codecs/rt1305.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190907074156.21907-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/rt1305.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c
index 9909369483f0..e27742abfa76 100644
--- a/sound/soc/codecs/rt1305.c
+++ b/sound/soc/codecs/rt1305.c
@@ -608,7 +608,8 @@ static const struct snd_soc_dapm_route rt1305_dapm_routes[] = {
static int rt1305_get_clk_info(int sclk, int rate)
{
- int i, pd[] = {1, 2, 3, 4, 6, 8, 12, 16};
+ int i;
+ static const int pd[] = {1, 2, 3, 4, 6, 8, 12, 16};
if (sclk <= 0 || rate <= 0)
return -EINVAL;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-09 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07 7:41 [PATCH] ASoC: rt1305: make array pd static const, makes object smaller Colin King
2019-09-09 10:07 ` Applied "ASoC: rt1305: make array pd static const, makes object smaller" to the asoc tree 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).