Skip to content
Commit 82fb5a36 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jakub Kicinski
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/4516676973f5adc1cdb76db1691c0f98b6fa6614.1748164348.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a540ee75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment