]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pinctrl: ocelot: Constify some structures
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 12 Dec 2024 17:12:58 +0000 (18:12 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 20 Dec 2024 12:48:31 +0000 (13:48 +0100)
commit1c6799266aacbddc9df8e2712566895e9a12641b
tree074e62fc9097fbd9b3b743c8d42c6d910b0090c6
parentfa4752d4b5999e2f4fac4689def0c7a306d5b909
pinctrl: ocelot: Constify some structures

'struct ocelot_match_data and 'struct irq_chip' are not modified in this
driver.

Constifying these structures moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  41459    9008      80   50547    c573 drivers/pinctrl/pinctrl-ocelot.o

After:
=====
   text    data     bss     dec     hex filename
  42803    7640      80   50523    c55b drivers/pinctrl/pinctrl-ocelot.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/32edcf0567fffd0b1a219e7e2dad7e0bd8c5aaf4.1734023550.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-ocelot.c