]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mfd: rohm-bd71828: Constify some structures
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 21 Jun 2025 10:28:38 +0000 (12:28 +0200)
committerLee Jones <lee@kernel.org>
Thu, 24 Jul 2025 10:27:06 +0000 (11:27 +0100)
commit86b0fc4b2b45a78cbdc11873bc596d140eff390c
tree5a9f1ddddcb2d8e2d19b0e95558e855e0ec52602
parent6865c645413399eaf54287aa2037974afdea2a47
mfd: rohm-bd71828: Constify some structures

Several structures are not modified in this driver. Constifying them moves
some data to a read-only section, so increases overall security, especially
when the structure holds some function pointers. This is the case for
'gpio_keys_platform_data' and 'mfd_cell'.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  18321   13952     192   32465    7ed1 drivers/mfd/rohm-bd71828.o

After:
=====
   text    data     bss     dec     hex filename
  22897    9376     192   32465    7ed1 drivers/mfd/rohm-bd71828.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/037e28e587ae899da9acdb45c606d75ec61f858b.1750501700.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/rohm-bd71828.c