Hello,
On 25/05/2025 at 11:40:04 +02, Christophe JAILLET [off-list ref] wrote:
'struct thermal_zone_device_ops' 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
28116 5168 128 33412 8284 drivers/thermal/armada_thermal.o
After:
=====
text data bss dec hex filename
28244 5040 128 33412 8284 drivers/thermal/armada_thermal.o
Signed-off-by: Christophe JAILLET <redacted>
---
Compile tested only
---
drivers/thermal/armada_thermal.c | 2 +-
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> # For Armada
Thanks,
Miquèl