From: Colin Ian King Date: Wed, 18 Aug 2021 15:17:46 +0000 (+0100) Subject: ASoC: uniphier: make arrays mul and div static const, makes object smaller X-Git-Tag: accepted/tizen/unified/20230118.172025~6151^2~1^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d925d9823aaf18d55fab784bd4ef11f80fe1099;p=platform%2Fkernel%2Flinux-rpi.git ASoC: uniphier: make arrays mul and div static const, makes object smaller Don't populate the arrays mul and div on the stack but instead make them static const. Makes the object code smaller by 4 bytes. Before: text data bss dec hex filename 16226 4984 64 21274 531a ./sound/soc/uniphier/aio-cpu.o After: text data bss dec hex filename 16062 5144 64 21270 5316 ./sound/soc/uniphier/aio-cpu.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210818151746.38520-1-colin.king@canonical.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/uniphier/aio-cpu.c b/sound/soc/uniphier/aio-cpu.c index cf98141..4e8d5f7 100644 --- a/sound/soc/uniphier/aio-cpu.c +++ b/sound/soc/uniphier/aio-cpu.c @@ -128,8 +128,8 @@ static const struct uniphier_aio_spec *find_spec(struct uniphier_aio *aio, static int find_divider(struct uniphier_aio *aio, int pll_id, unsigned int freq) { struct uniphier_aio_pll *pll; - int mul[] = { 1, 1, 1, 2, }; - int div[] = { 2, 3, 1, 3, }; + static const int mul[] = { 1, 1, 1, 2, }; + static const int div[] = { 2, 3, 1, 3, }; int i; if (!is_valid_pll(aio->chip, pll_id))