Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atm: horizon: constify pci_device_id.

pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

File size before:
text data bss dec hex filename
9859 328 6 10193 27d1 drivers/atm/horizon.o

File size After adding 'const':
text data bss dec hex filename
9923 264 6 10193 27d1 drivers/atm/horizon.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arvind Yadav and committed by
David S. Miller
77c0805d 5c007845

+1 -1
+1 -1
drivers/atm/horizon.c
··· 2867 2867 MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames"); 2868 2868 MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles"); 2869 2869 2870 - static struct pci_device_id hrz_pci_tbl[] = { 2870 + static const struct pci_device_id hrz_pci_tbl[] = { 2871 2871 { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID, 2872 2872 0, 0, 0 }, 2873 2873 { 0, }