Skip to content

Commit 2c2207a

Browse files
rikardfalkebornherbertx
authored andcommitted
crypto: hisilicon/hpre - constify struct debugfs_reg32
hpre_cluster_dfx_regs and hpre_com_dfx_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 16455 6288 480 23223 5ab7 drivers/crypto/hisilicon/hpre/hpre_main.o After: text data bss dec hex filename 16839 5904 480 23223 5ab7 drivers/crypto/hisilicon/hpre/hpre_main.o Signed-off-by: Rikard Falkeborn <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 1036bb5 commit 2c2207a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/crypto/hisilicon/hpre/hpre_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ static const u64 hpre_cluster_offsets[] = {
134134
HPRE_CLSTR_BASE + HPRE_CLUSTER3 * HPRE_CLSTR_ADDR_INTRVL,
135135
};
136136

137-
static struct debugfs_reg32 hpre_cluster_dfx_regs[] = {
137+
static const struct debugfs_reg32 hpre_cluster_dfx_regs[] = {
138138
{"CORES_EN_STATUS ", HPRE_CORE_EN_OFFSET},
139139
{"CORES_INI_CFG ", HPRE_CORE_INI_CFG_OFFSET},
140140
{"CORES_INI_STATUS ", HPRE_CORE_INI_STATUS_OFFSET},
141141
{"CORES_HTBT_WARN ", HPRE_CORE_HTBT_WARN_OFFSET},
142142
{"CORES_IS_SCHD ", HPRE_CORE_IS_SCHD_OFFSET},
143143
};
144144

145-
static struct debugfs_reg32 hpre_com_dfx_regs[] = {
145+
static const struct debugfs_reg32 hpre_com_dfx_regs[] = {
146146
{"READ_CLR_EN ", HPRE_CTRL_CNT_CLR_CE},
147147
{"AXQOS ", HPRE_VFG_AXQOS},
148148
{"AWUSR_CFG ", HPRE_AWUSR_FP_CFG},

0 commit comments

Comments
 (0)