]> www.infradead.org Git - users/dwmw2/linux.git/commit
ata: Constify struct pci_device_id
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 15 Nov 2024 21:08:55 +0000 (22:08 +0100)
committerNiklas Cassel <cassel@kernel.org>
Tue, 3 Dec 2024 04:10:20 +0000 (05:10 +0100)
commit9986ce65bebb9a07a080d1e6ce04926b4c49ff17
tree251119c71fce1f92c16aacc7d143cbd92d23cc12
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
ata: Constify struct pci_device_id

'struct pci_device_id' is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
   4245    1454       4    5703    1647 drivers/ata/ata_generic.o

After:
=====
   text    data     bss     dec     hex filename
   4725     974       4    5703    1647 drivers/ata/ata_generic.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/8bddfee7f6f0f90eeb6da7156e30ab3bd553deb1.1731704917.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/ata_generic.c
drivers/ata/pata_atp867x.c
drivers/ata/pata_piccolo.c