Message ID | 1500314995-3181-2-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d86d8dbdebcc8c2ef763af79b5bc1db4846216ad |
Delegated to: | Kalle Valo |
Headers | show |
On 07/17/2017 01:09 PM, Arvind Yadav wrote: > 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 > 2833 945 12 3790 ece realtek/rtlwifi/rtl8192de/sw.o > > File size After adding 'const': > text data bss dec hex filename > 2929 849 12 3790 ece realtek/rtlwifi/rtl8192de/sw.o > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> This applies to all 11. Thanks, Larry
Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: > 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 > 2833 945 12 3790 ece realtek/rtlwifi/rtl8192de/sw.o > > File size After adding 'const': > text data bss dec hex filename > 2929 849 12 3790 ece realtek/rtlwifi/rtl8192de/sw.o > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> > Acked-by: Larry Finger <Larry.Finger@lwfinger.net> 7 patches applied to wireless-drivers-next.git, thanks. d86d8dbdebcc rtlwifi: rtl8192de: constify pci_device_id. 67f512e6707f rtlwifi: rtl8192se: constify pci_device_id. 468952f14714 rtlwifi: rtl8821ae: constify pci_device_id. e9a214def6ce rtlwifi: rtl8723ae: constify pci_device_id. 8c6f0f5bf1e1 rtlwifi: rtl8723be: constify pci_device_id. 4dc2efc132a7 rtlwifi: rtl8188ee: constify pci_device_id. d20d893d7a74 rtlwifi: rtl8192ee: constify pci_device_id.
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c index 16132c6..be23dac 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c @@ -347,7 +347,7 @@ static const struct rtl_hal_cfg rtl92de_hal_cfg = { .maps[RTL_RC_HT_RATEMCS15] = DESC_RATEMCS15, }; -static struct pci_device_id rtl92de_pci_ids[] = { +static const struct pci_device_id rtl92de_pci_ids[] = { {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8193, rtl92de_hal_cfg)}, {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x002B, rtl92de_hal_cfg)}, {},
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 2833 945 12 3790 ece realtek/rtlwifi/rtl8192de/sw.o File size After adding 'const': text data bss dec hex filename 2929 849 12 3790 ece realtek/rtlwifi/rtl8192de/sw.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)