]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: Constify struct configfs_item_operations and configfs_group_operations
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 14 Dec 2025 09:31:40 +0000 (10:31 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Wed, 17 Dec 2025 09:27:08 +0000 (10:27 +0100)
commit0eaf298143684da68a61b2633121b3deff47b267
tree3b494c5143ea8ee17a335dc9cb3c1f50740ec349
parent77f25f0c2e1f59b35600b4d29bd6b2c54c31ab75
gpio: Constify struct configfs_item_operations and configfs_group_operations

'struct configfs_item_operations' and 'configfs_group_operations' are not
modified in these drivers.

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

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  43935   11632     384   55951    da8f drivers/gpio/gpio-aggregator.o

After:
=====
   text    data     bss     dec     hex filename
  44191   11376     384   55951    da8f drivers/gpio/gpio-aggregator.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/ccb5155342ce6dbb89cfbad0687b448860d8e8f0.1765703044.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-aggregator.c
drivers/gpio/gpio-sim.c
drivers/gpio/gpio-virtuser.c