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

pinctrl: actions: pinctrl-s500: Constify s500_padinfo[]

s500_padinfo[] is never modified and should be made 'const' to allow
the compiler to optimize code generation, i.e. put it in the text
section instead of the data section.

Before:
text data bss dec hex filename
12503 5088 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o

After:
text data bss dec hex filename
14435 3156 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Link: https://lore.kernel.org/r/24505deb08d050eb4ce38f186f4037d7541ea217.1605722628.git.cristian.ciocaltea@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Cristian Ciocaltea and committed by
Linus Walleij
43bb48c3 552a9cc0

+1 -1
+1 -1
drivers/pinctrl/actions/pinctrl-s500.c
··· 1485 1485 static PAD_PULLCTL_CONF(DNAND_D7, 2, 2, 1); 1486 1486 1487 1487 /* Pad info table */ 1488 - static struct owl_padinfo s500_padinfo[NUM_PADS] = { 1488 + static const struct owl_padinfo s500_padinfo[NUM_PADS] = { 1489 1489 [DNAND_DQS] = PAD_INFO_PULLCTL(DNAND_DQS), 1490 1490 [DNAND_DQSN] = PAD_INFO_PULLCTL(DNAND_DQSN), 1491 1491 [ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),