2017-07-17 18:10:10

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 00/11] constify net 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.

Arvind Yadav (11):
[PATCH 01/11] rtlwifi: rtl8192de: constify pci_device_id.
[PATCH 02/11] rtlwifi: rtl8192se: constify pci_device_id.
[PATCH 03/11] rtlwifi: rtl8821ae: constify pci_device_id.
[PATCH 04/11] rtlwifi: rtl8723ae: constify pci_device_id.
[PATCH 05/11] rtlwifi: rtl8723be: constify pci_device_id.
[PATCH 06/11] rtlwifi: rtl8188ee: constify pci_device_id.
[PATCH 07/11] rtlwifi: rtl8192ee: constify pci_device_id.
[PATCH 08/11] net: cadence: macb: constify pci_device_id.
[PATCH 09/11] net: ec_bhf: constify pci_device_id.
[PATCH 10/11] net: qtnfmac: constify pci_device_id.
[PATCH 11/11] net: brcmfmac: constify pci_device_id.

drivers/net/ethernet/cadence/macb_pci.c | 2 +-
drivers/net/ethernet/ec_bhf.c | 2 +-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +-
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)

--
2.7.4


2017-07-17 18:10:19

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 03/11] rtlwifi: rtl8821ae: 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
2491 960 0 3451 d7b realtek/rtlwifi/rtl8821ae/sw.o

File size After adding 'const':
text data bss dec hex filename
2587 864 0 3451 d7b realtek/rtlwifi/rtl8821ae/sw.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
index d71d277..d94e179 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
@@ -424,7 +424,7 @@ static const struct rtl_hal_cfg rtl8821ae_hal_cfg = {
.maps[RTL_RC_VHT_RATE_2SS_MCS9] = DESC_RATEVHT2SS_MCS9,
};

-static struct pci_device_id rtl8821ae_pci_ids[] = {
+static const struct pci_device_id rtl8821ae_pci_ids[] = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8812, rtl8821ae_hal_cfg)},
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8821, rtl8821ae_hal_cfg)},
{},
--
2.7.4

2017-07-17 18:10:27

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 04/11] rtlwifi: rtl8723ae: 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
2775 912 0 3687 e67 realtek/rtlwifi/rtl8723ae/sw.o

File size After adding 'const':
text data bss dec hex filename
2839 848 0 3687 e67 realtek/rtlwifi/rtl8723ae/sw.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
index 7bf9f25..87dc271 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
@@ -367,7 +367,7 @@ static const struct rtl_hal_cfg rtl8723e_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] = DESC92C_RATEMCS15,
};

-static struct pci_device_id rtl8723e_pci_ids[] = {
+static const struct pci_device_id rtl8723e_pci_ids[] = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8723, rtl8723e_hal_cfg)},
{},
};
--
2.7.4

2017-07-17 18:10:47

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 07/11] rtlwifi: rtl8192ee: 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
1899 928 0 2827 b0b realtek/rtlwifi/rtl8192ee/sw.o

File size After adding 'const':
text data bss dec hex filename
1963 864 0 2827 b0b realtek/rtlwifi/rtl8192ee/sw.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
index eaa503b..bc4e561 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c
@@ -354,7 +354,7 @@ static const struct rtl_hal_cfg rtl92ee_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] = DESC92C_RATEMCS15,
};

-static struct pci_device_id rtl92ee_pci_ids[] = {
+static const struct pci_device_id rtl92ee_pci_ids[] = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x818B, rtl92ee_hal_cfg)},
{},
};
--
2.7.4

2017-07-17 18:10:25

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 05/11] rtlwifi: rtl8723be: 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
3032 912 0 3944 f68 realtek/rtlwifi/rtl8723be/sw.o

File size After adding 'const':
text data bss dec hex filename
3096 848 0 3944 f68 realtek/rtlwifi/rtl8723be/sw.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
index f9d10f1..fdd0c41 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
@@ -380,7 +380,7 @@ static const struct rtl_hal_cfg rtl8723be_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] = DESC92C_RATEMCS15,
};

-static struct pci_device_id rtl8723be_pci_ids[] = {
+static const struct pci_device_id rtl8723be_pci_ids[] = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB723, rtl8723be_hal_cfg)},
{},
};
--
2.7.4

2017-07-17 18:11:28

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 06/11] rtlwifi: rtl8188ee: 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
3090 912 0 4002 fa2 realtek/rtlwifi/rtl8188ee/sw.o

File size After adding 'const':
text data bss dec hex filename
3154 848 0 4002 fa2 realtek/rtlwifi/rtl8188ee/sw.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
index 774e720..25b1e6d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c
@@ -376,7 +376,7 @@ static const struct rtl_hal_cfg rtl88ee_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] = DESC92C_RATEMCS15,
};

-static struct pci_device_id rtl88ee_pci_ids[] = {
+static const struct pci_device_id rtl88ee_pci_ids[] = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8179, rtl88ee_hal_cfg)},
{},
};
--
2.7.4

2017-07-17 18:10:15

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 01/11] rtlwifi: rtl8192de: 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
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 <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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)},
{},
--
2.7.4

2017-07-17 18:12:39

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 02/11] rtlwifi: rtl8192se: 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
2817 1040 0 3857 f11 realtek/rtlwifi/rtl8192se/sw.o

File size After adding 'const':
text data bss dec hex filename
3009 848 0 3857 f11 realtek/rtlwifi/rtl8192se/sw.o

Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
index 2006b09..201100e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
@@ -396,7 +396,7 @@ static const struct rtl_hal_cfg rtl92se_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] = DESC_RATEMCS15,
};

-static struct pci_device_id rtl92se_pci_ids[] = {
+static const struct pci_device_id rtl92se_pci_ids[] = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8192, rtl92se_hal_cfg)},
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8171, rtl92se_hal_cfg)},
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8172, rtl92se_hal_cfg)},
--
2.7.4

2017-07-17 20:14:25

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH 01/11] rtlwifi: rtl8192de: constify pci_device_id.

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 <[email protected]>

Acked-by: Larry Finger <[email protected]>

This applies to all 11.

Thanks,

Larry

2017-08-03 10:06:50

by Kalle Valo

[permalink] [raw]
Subject: Re: [01/11] rtlwifi: rtl8192de: constify pci_device_id.

Arvind Yadav <[email protected]> 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 <[email protected]>
> Acked-by: Larry Finger <[email protected]>

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.

--
https://patchwork.kernel.org/patch/9845899/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches