diff options
author | 2024-09-28 18:20:56 +0200 | |
---|---|---|
committer | 2024-10-14 12:40:10 +0200 | |
commit | 5bb798cfdfd00182065cf55c1ff4b2c08d3be13f (patch) | |
tree | d6880663ad6e826e2f0ce2a4cac4d7cabea23a75 /include/linux/memstick.h | |
parent | mmc: sh_mmcif: correctly report success when obtaining DMA channels (diff) | |
download | wireguard-linux-5bb798cfdfd00182065cf55c1ff4b2c08d3be13f.tar.xz wireguard-linux-5bb798cfdfd00182065cf55c1ff4b2c08d3be13f.zip |
memstick: Constify struct memstick_device_id
'struct memstick_device_id' are not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increases overall security.
Update memstick_dev_match(), memstick_bus_match() and struct
memstick_driver accordingly.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
74055 3455 88 77598 12f1e drivers/memstick/core/ms_block.o
After:
=====
text data bss dec hex filename
74087 3423 88 77598 12f1e drivers/memstick/core/ms_block.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/6509d6f6ed64193f04e747a98ccea7492c976ca8.1727540434.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/memstick.h')
-rw-r--r-- | include/linux/memstick.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/memstick.h b/include/linux/memstick.h index ebf73d4ee969..107bdcbedf79 100644 --- a/include/linux/memstick.h +++ b/include/linux/memstick.h @@ -293,7 +293,7 @@ struct memstick_host { }; struct memstick_driver { - struct memstick_device_id *id_table; + const struct memstick_device_id *id_table; int (*probe)(struct memstick_dev *card); void (*remove)(struct memstick_dev *card); int (*suspend)(struct memstick_dev *card, |