[PATCH] firewire: nosy: constify pci_device_id.
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: textdata bss dec hex filename 5796 389 061851829 drivers/firewire/nosy.o File size After adding 'const': textdata bss dec hex filename 5860 325 061851829 drivers/firewire/nosy.o Signed-off-by: Arvind Yadav--- drivers/firewire/nosy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firewire/nosy.c b/drivers/firewire/nosy.c index 180f0a9..d16a9dc9 100644 --- a/drivers/firewire/nosy.c +++ b/drivers/firewire/nosy.c @@ -694,7 +694,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused) return ret; } -static struct pci_device_id pci_table[] = { +static const struct pci_device_id pci_table[] = { { .vendor =PCI_VENDOR_ID_TI, .device =PCI_DEVICE_ID_TI_PCILYNX, -- 2.7.4
[PATCH] firewire: nosy: constify pci_device_id.
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: textdata bss dec hex filename 5796 389 061851829 drivers/firewire/nosy.o File size After adding 'const': textdata bss dec hex filename 5860 325 061851829 drivers/firewire/nosy.o Signed-off-by: Arvind Yadav --- drivers/firewire/nosy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firewire/nosy.c b/drivers/firewire/nosy.c index 180f0a9..d16a9dc9 100644 --- a/drivers/firewire/nosy.c +++ b/drivers/firewire/nosy.c @@ -694,7 +694,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused) return ret; } -static struct pci_device_id pci_table[] = { +static const struct pci_device_id pci_table[] = { { .vendor =PCI_VENDOR_ID_TI, .device =PCI_DEVICE_ID_TI_PCILYNX, -- 2.7.4