Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

memory: tegra: make the array list static const, makes object smaller

Don't populate the array list on the stack but instead it
static const. Makes the object code smaller by 110 bytes:

Before:
text data bss dec hex filename
37713 21992 64 59769 e979 .../tegra/tegra210-emc-cc-r21021.o

After:
text data bss dec hex filename
37539 22056 64 59659 e90b .../tegra/tegra210-emc-cc-r21021.o

(gcc version 10.3.0)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210819133155.10441-1-colin.king@canonical.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

authored by

Colin Ian King and committed by
Krzysztof Kozlowski
d71b90e3 6880fa6c

+1 -1
+1 -1
drivers/memory/tegra/tegra210-emc-cc-r21021.c
··· 478 478 static u32 tegra210_emc_r21021_periodic_compensation(struct tegra210_emc *emc) 479 479 { 480 480 u32 emc_cfg, emc_cfg_o, emc_cfg_update, del, value; 481 - u32 list[] = { 481 + static const u32 list[] = { 482 482 EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_0, 483 483 EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_1, 484 484 EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_2,