diff options
author | 2024-09-08 08:52:07 +0200 | |
---|---|---|
committer | 2024-09-10 00:36:50 +0200 | |
commit | 35b6c073cc6c854102dda5a9b57fe2fa9c39a468 (patch) | |
tree | ae99890e0e8e7257a44f2d2291e329a913963834 /scripts/lib/kdoc/kdoc_files.py | |
parent | i2c: rcar: tidyup priv->devtype handling on rcar_i2c_probe() (diff) | |
download | linux-rng-35b6c073cc6c854102dda5a9b57fe2fa9c39a468.tar.xz linux-rng-35b6c073cc6c854102dda5a9b57fe2fa9c39a468.zip |
i2c: virtio: Constify struct i2c_algorithm and struct virtio_device_id
'struct i2c_algorithm' and 'struct virtio_device_id' are not modified in
this driver.
Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers, which is the case for struct i2c_algorithm.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
6663 568 16 7247 1c4f drivers/i2c/busses/i2c-virtio.o
After:
=====
text data bss dec hex filename
6735 472 16 7223 1c37 drivers/i2c/busses/i2c-virtio.o
--
Compile tested only
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions