memstick: Constify struct memstick_device_id
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 28 Sep 2024 16:20:56 +0000 (18:20 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Oct 2024 10:40:10 +0000 (12:40 +0200)
commit5bb798cfdfd00182065cf55c1ff4b2c08d3be13f
treed6880663ad6e826e2f0ce2a4cac4d7cabea23a75
parentd61366cd7a64468396bf4030b1974782655e94c3
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>
drivers/memstick/core/memstick.c
drivers/memstick/core/ms_block.c
drivers/memstick/core/mspro_block.c
include/linux/memstick.h