From: Colin Ian King Date: Wed, 26 May 2021 16:06:16 +0000 (+0100) Subject: ALSA: hda/ca0132: Make a const array static, makes object smaller X-Git-Tag: v5.15~819^2~9^2~214 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d955782da2901f977ef1ededba8a2764e35c1187;p=platform%2Fkernel%2Flinux-starfive.git ALSA: hda/ca0132: Make a const array static, makes object smaller 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 Link: https://lore.kernel.org/r/20210526160616.3764119-1-colin.king@canonical.com Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 49b4fdd..b66e7bd 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;