]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 25 May 2025 12:47:35 +0000 (14:47 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 26 May 2025 12:31:27 +0000 (15:31 +0300)
commit9c96808f10d84156b5e98e16176b725ec5a1386f
tree5c9fab183d6d4d7d4a7e6d56b7efa8a8d6c2ae67
parent69157b00b526c31522a00b9908bfd53fa21b47f2
thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops

'struct thermal_zone_device_ops' could be left unmodified in this driver.

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

While at it, also constify a struct thermal_zone_params.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  26422   12584     512   39518    9a5e drivers/platform/x86/acerhdf.o

After:
=====
   text    data     bss     dec     hex filename
  26646   12360     512   39518    9a5e drivers/platform/x86/acerhdf.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e502fadf2c6b24fc4ec3a7880533f7ca68429720.1748177235.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/acerhdf.c