diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-09-20 22:25:24 +0200 |
---|---|---|
committer | Chen-Yu Tsai <wens@csie.org> | 2024-10-25 23:35:49 +0800 |
commit | c7e09a613bbddd0eea086e475855aba3b2410148 (patch) | |
tree | fd56ca2fc31952b09eedb44dbadd469ddac8df2e /drivers/clk/sunxi-ng/ccu-sun9i-a80.c | |
parent | d0c322b6e4bff8cc0e40ee4983bf2ab1f7f680f0 (diff) |
clk: sunxi-ng: Constify struct ccu_reset_map
'struct ccu_reset_map' are not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
1533 2224 0 3757 ead drivers/clk/sunxi-ng/ccu-sun20i-d1-r.o
After:
=====
text data bss dec hex filename
1597 2160 0 3757 ead drivers/clk/sunxi-ng/ccu-sun20i-d1-r.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/44745f27034fa670605cd16966a39b7fe88fe5a6.1726863905.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu-sun9i-a80.c')
-rw-r--r-- | drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sunxi-ng/ccu-sun9i-a80.c b/drivers/clk/sunxi-ng/ccu-sun9i-a80.c index 756dd8fca6b0..5da9a16b4ec7 100644 --- a/drivers/clk/sunxi-ng/ccu-sun9i-a80.c +++ b/drivers/clk/sunxi-ng/ccu-sun9i-a80.c @@ -1108,7 +1108,7 @@ static struct clk_hw_onecell_data sun9i_a80_hw_clks = { .num = CLK_NUMBER, }; -static struct ccu_reset_map sun9i_a80_ccu_resets[] = { +static const struct ccu_reset_map sun9i_a80_ccu_resets[] = { /* AHB0 reset controls */ [RST_BUS_FD] = { 0x5a0, BIT(0) }, [RST_BUS_VE] = { 0x5a0, BIT(1) }, |