* [PATCH][next] ALSA: hda/ca0132: Make a const array static, makes object smaller
@ 2021-05-26 16:06 Colin King
2021-05-27 6:26 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2021-05-26 16:06 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Connor McAdams, alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the const array dsp_dma_stream_ids the stack but instead
make it static. Makes the object code smaller by 21 bytes.
Before:
text data bss dec hex filename
189012 70376 192 259580 3f5fc ./sound/pci/hda/patch_ca0132.o
After:
text data bss dec hex filename
188927 70440 192 259559 3f5e7 ./sound/pci/hda/patch_ca0132.o
(gcc version 10.3.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/pci/hda/patch_ca0132.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 49b4fdd2feab..b66e7bdbf483 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -7598,7 +7598,7 @@ static void ca0132_alt_free_active_dma_channels(struct hda_codec *codec)
*/
static void ca0132_alt_start_dsp_audio_streams(struct hda_codec *codec)
{
- const unsigned int dsp_dma_stream_ids[] = { 0x0c, 0x03, 0x04 };
+ static const unsigned int dsp_dma_stream_ids[] = { 0x0c, 0x03, 0x04 };
struct ca0132_spec *spec = codec->spec;
unsigned int i, tmp;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] ALSA: hda/ca0132: Make a const array static, makes object smaller
2021-05-26 16:06 [PATCH][next] ALSA: hda/ca0132: Make a const array static, makes object smaller Colin King
@ 2021-05-27 6:26 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-05-27 6:26 UTC (permalink / raw)
To: Colin King
Cc: Jaroslav Kysela, Takashi Iwai, Connor McAdams, alsa-devel,
kernel-janitors, linux-kernel
On Wed, 26 May 2021 18:06:16 +0200,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the const array dsp_dma_stream_ids the stack but instead
> make it static. Makes the object code smaller by 21 bytes.
>
> Before:
> text data bss dec hex filename
> 189012 70376 192 259580 3f5fc ./sound/pci/hda/patch_ca0132.o
>
> After:
> text data bss dec hex filename
> 188927 70440 192 259559 3f5e7 ./sound/pci/hda/patch_ca0132.o
>
> (gcc version 10.3.0)
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] ALSA: hda/ca0132: Make a const array static, makes object smaller
@ 2021-05-27 6:26 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-05-27 6:26 UTC (permalink / raw)
To: Colin King
Cc: alsa-devel, kernel-janitors, linux-kernel, Takashi Iwai, Connor McAdams
On Wed, 26 May 2021 18:06:16 +0200,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the const array dsp_dma_stream_ids the stack but instead
> make it static. Makes the object code smaller by 21 bytes.
>
> Before:
> text data bss dec hex filename
> 189012 70376 192 259580 3f5fc ./sound/pci/hda/patch_ca0132.o
>
> After:
> text data bss dec hex filename
> 188927 70440 192 259559 3f5e7 ./sound/pci/hda/patch_ca0132.o
>
> (gcc version 10.3.0)
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-27 6:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 16:06 [PATCH][next] ALSA: hda/ca0132: Make a const array static, makes object smaller Colin King
2021-05-27 6:26 ` Takashi Iwai
2021-05-27 6:26 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.