diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2025-05-25 12:13:17 +0300 | 
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-28 03:31:42 +0300 | 
| commit | 82fb5a369b8de625660c8c7f82e5286ec195be5e (patch) | |
| tree | 27ce98e3f87b2aec16b733f8d179b30e221d02af /rust/helpers/build_assert.c | |
| parent | a540ee75945a96f606c6ac955bfed5410d318f7d (diff) | |
| download | linux-82fb5a369b8de625660c8c7f82e5286ec195be5e.tar.xz | |
mlxsw: core_thermal: Constify struct thermal_zone_device_ops
'struct thermal_zone_device_ops' are not modified in this driver.
Constifying these structures 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
  24899	   8036	      0	  32935	   80a7	drivers/net/ethernet/mellanox/mlxsw/core_thermal.o
After:
=====
   text	   data	    bss	    dec	    hex	filename
  25379	   7556	      0	  32935	   80a7	drivers/net/ethernet/mellanox/mlxsw/core_thermal.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/4516676973f5adc1cdb76db1691c0f98b6fa6614.1748164348.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/build_assert.c')
0 files changed, 0 insertions, 0 deletions
