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

crypto: ccree - constify struct debugfs_reg32

pid_cd_regs and debug_regs are never changed and can therefore be made
const.

This allows the compiler to put it in the text section instead of the
data section.

Before:
text data bss dec hex filename
2871 2320 64 5255 1487 drivers/crypto/ccree/cc_debugfs.o

After:
text data bss dec hex filename
3255 1936 64 5255 1487 drivers/crypto/ccree/cc_debugfs.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Rikard Falkeborn and committed by
Herbert Xu
1036bb50 0c0408e8

+2 -2
+2 -2
drivers/crypto/ccree/cc_debugfs.c
··· 26 26 { .name = "VERSION" }, /* Must be 1st */ 27 27 }; 28 28 29 - static struct debugfs_reg32 pid_cid_regs[] = { 29 + static const struct debugfs_reg32 pid_cid_regs[] = { 30 30 CC_DEBUG_REG(PERIPHERAL_ID_0), 31 31 CC_DEBUG_REG(PERIPHERAL_ID_1), 32 32 CC_DEBUG_REG(PERIPHERAL_ID_2), ··· 38 38 CC_DEBUG_REG(COMPONENT_ID_3), 39 39 }; 40 40 41 - static struct debugfs_reg32 debug_regs[] = { 41 + static const struct debugfs_reg32 debug_regs[] = { 42 42 CC_DEBUG_REG(HOST_IRR), 43 43 CC_DEBUG_REG(HOST_POWER_DOWN_EN), 44 44 CC_DEBUG_REG(AXIM_MON_ERR),