diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-09-07 22:36:29 +0200 |
|---|---|---|
| committer | Hans Verkuil <hverkuil@xs4all.nl> | 2025-02-21 10:33:12 +0100 |
| commit | fc91d334e045dab1b5f01bd88b4906ad1dfbd223 (patch) | |
| tree | ceae9c27b82c48ec02450e1e9dfcd9ba979846ea /tools/perf/scripts | |
| parent | media: dibx000_common: Constify struct i2c_algorithm (diff) | |
| download | linux-fc91d334e045dab1b5f01bd88b4906ad1dfbd223.tar.gz linux-fc91d334e045dab1b5f01bd88b4906ad1dfbd223.zip | |
media: dvb-usb: Constify struct i2c_algorithm
'struct i2c_algorithm' are not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.
More over, dvb_usb_device_properties->i2c_algo seems to only be copied in
i2c_adapter->algo, which is already a "const struct i2c_algorithm".
This is done in dvb_usb_i2c_init()
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
30571 5916 36 36523 8eab drivers/media/usb/dvb-usb/af9005.o
After:
=====
text data bss dec hex filename
30667 5852 36 36555 8ecb drivers/media/usb/dvb-usb/af9005.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
