linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] constify atm pci_device_id.
@ 2017-07-16  9:32 Arvind Yadav
  2017-07-16  9:32 ` [PATCH 01/12] atm: iphase: constify pci_device_id Arvind Yadav
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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 (12):
  [PATCH 01/12] atm: iphase: constify pci_device_id.
  [PATCH 02/12] atm: ambassador: constify pci_device_id.
  [PATCH 03/12] atm: fore200e: constify pci_device_id.
  [PATCH 04/12] atm: nicstar: constify pci_device_id.
  [PATCH 05/12] atm: he: constify pci_device_id.
  [PATCH 06/12] atm: horizon: constify pci_device_id.
  [PATCH 07/12] atm: solos-pci: constify pci_device_id.
  [PATCH 08/12] atm: lanai: constify pci_device_id.
  [PATCH 09/12] atm: zatm: constify pci_device_id.
  [PATCH 10/12] atm: firestream: constify pci_device_id.
  [PATCH 11/12] atm: eni: constify pci_device_id.
  [PATCH 12/12] atm: idt77252: constify pci_device_id.

 drivers/atm/ambassador.c | 2 +-
 drivers/atm/eni.c        | 2 +-
 drivers/atm/firestream.c | 2 +-
 drivers/atm/fore200e.c   | 2 +-
 drivers/atm/he.c         | 2 +-
 drivers/atm/horizon.c    | 2 +-
 drivers/atm/idt77252.c   | 2 +-
 drivers/atm/iphase.c     | 2 +-
 drivers/atm/lanai.c      | 2 +-
 drivers/atm/nicstar.c    | 2 +-
 drivers/atm/solos-pci.c  | 2 +-
 drivers/atm/zatm.c       | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 01/12] atm: iphase: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 02/12] atm: ambassador: " Arvind Yadav
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  23536	    432	    160	  24128	   5e40	drivers/atm/iphase.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  23632	    336	    160	  24128	   5e40	drivers/atm/iphase.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/iphase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index a4fa6c8..fc72b76 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -3266,7 +3266,7 @@ static void ia_remove_one(struct pci_dev *pdev)
       	kfree(iadev);
 }
 
-static struct pci_device_id ia_pci_tbl[] = {
+static const struct pci_device_id ia_pci_tbl[] = {
 	{ PCI_VENDOR_ID_IPHASE, 0x0008, PCI_ANY_ID, PCI_ANY_ID, },
 	{ PCI_VENDOR_ID_IPHASE, 0x0009, PCI_ANY_ID, PCI_ANY_ID, },
 	{ 0,}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 02/12] atm: ambassador: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
  2017-07-16  9:32 ` [PATCH 01/12] atm: iphase: constify pci_device_id Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 03/12] atm: fore200e: " Arvind Yadav
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  13372	    408	      4	  13784	   35d8	drivers/atm/ambassador.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  13484	    296	      4	  13784	   35d8	drivers/atm/ambassador.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/ambassador.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 906705e..acf16c3 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -2374,7 +2374,7 @@ MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles");
 
 /********** module entry **********/
 
-static struct pci_device_id amb_pci_tbl[] = {
+static const struct pci_device_id amb_pci_tbl[] = {
 	{ PCI_VDEVICE(MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR), 0 },
 	{ PCI_VDEVICE(MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD), 0 },
 	{ 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 03/12] atm: fore200e: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
  2017-07-16  9:32 ` [PATCH 01/12] atm: iphase: constify pci_device_id Arvind Yadav
  2017-07-16  9:32 ` [PATCH 02/12] atm: ambassador: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 04/12] atm: nicstar: " Arvind Yadav
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  20025	    320	     16	  20361	   4f89	drivers/atm/fore200e.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  20089	    256	     16	  20361	   4f89	drivers/atm/fore200e.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/fore200e.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f0433ad..f8b7e86 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2757,7 +2757,7 @@ static void fore200e_pca_remove_one(struct pci_dev *pci_dev)
 }
 
 
-static struct pci_device_id fore200e_pca_tbl[] = {
+static const struct pci_device_id fore200e_pca_tbl[] = {
     { PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID,
       0, 0, (unsigned long) &fore200e_bus[0] },
     { 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 04/12] atm: nicstar: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 03/12] atm: fore200e: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 05/12] atm: he: " Arvind Yadav
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  22781	    464	    128	  23373	   5b4d	drivers/atm/nicstar.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  22845	    400	    128	  23373	   5b4d	drivers/atm/nicstar.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/nicstar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index d879f3b..9588d80 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -253,7 +253,7 @@ static void nicstar_remove_one(struct pci_dev *pcidev)
 	kfree(card);
 }
 
-static struct pci_device_id nicstar_pci_tbl[] = {
+static const struct pci_device_id nicstar_pci_tbl[] = {
 	{ PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77201), 0 },
 	{0,}			/* terminate list */
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 05/12] atm: he: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 04/12] atm: nicstar: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 06/12] atm: horizon: " Arvind Yadav
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  26514	    440	     48	  27002	   697a	drivers/atm/he.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  26578	    376	     48	  27002	   697a	drivers/atm/he.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/he.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 37ee21c..8f6156d 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -2851,7 +2851,7 @@ MODULE_PARM_DESC(irq_coalesce, "use interrupt coalescing (default 1)");
 module_param(sdh, bool, 0);
 MODULE_PARM_DESC(sdh, "use SDH framing (default 0)");
 
-static struct pci_device_id he_pci_tbl[] = {
+static const struct pci_device_id he_pci_tbl[] = {
 	{ PCI_VDEVICE(FORE, PCI_DEVICE_ID_FORE_HE), 0 },
 	{ 0, }
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/12] atm: horizon: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (4 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 05/12] atm: he: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 07/12] atm: solos-pci: " Arvind Yadav
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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>
---
 drivers/atm/horizon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 0f18480..7e76b35 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -2867,7 +2867,7 @@ MODULE_PARM_DESC(max_tx_size, "maximum size of TX AAL5 frames");
 MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames");
 MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles");
 
-static struct pci_device_id hrz_pci_tbl[] = {
+static const struct pci_device_id hrz_pci_tbl[] = {
 	{ PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID,
 	  0, 0, 0 },
 	{ 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 07/12] atm: solos-pci: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (5 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 06/12] atm: horizon: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 08/12] atm: lanai: " Arvind Yadav
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  16138	   4592	     24	  20754	   5112	drivers/atm/solos-pci.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  16218	   4528	     24	  20754	   5122	drivers/atm/solos-pci.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/solos-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index c8f2ca6..585984e 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -1476,7 +1476,7 @@ static void fpga_remove(struct pci_dev *dev)
 	kfree(card);
 }
 
-static struct pci_device_id fpga_pci_tbl[] = {
+static const struct pci_device_id fpga_pci_tbl[] = {
 	{ 0x10ee, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0, }
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 08/12] atm: lanai: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (6 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 07/12] atm: solos-pci: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 09/12] atm: zatm: " Arvind Yadav
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  18074	    352	      0	  18426	   47fa	drivers/atm/lanai.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  18170	    256	      0	  18426	   47fa	drivers/atm/lanai.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/lanai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 1a9bc51..2351dad 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -2589,7 +2589,7 @@ static int lanai_init_one(struct pci_dev *pci,
 	return result;
 }
 
-static struct pci_device_id lanai_pci_tbl[] = {
+static const struct pci_device_id lanai_pci_tbl[] = {
 	{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_LANAI2) },
 	{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_LANAIHB) },
 	{ 0, }	/* terminal entry */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 09/12] atm: zatm: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (7 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 08/12] atm: lanai: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 10/12] atm: firestream: " Arvind Yadav
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  14350	    352	     40	  14742	   3996	drivers/atm/zatm.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  14446	    256	     40	  14742	   3996	drivers/atm/zatm.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/zatm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 292dec1..d3aa748 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -1642,7 +1642,7 @@ static int zatm_init_one(struct pci_dev *pci_dev,
 
 MODULE_LICENSE("GPL");
 
-static struct pci_device_id zatm_pci_tbl[] = {
+static const struct pci_device_id zatm_pci_tbl[] = {
 	{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER },
 	{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 },
 	{ 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 10/12] atm: firestream: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (8 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 09/12] atm: zatm: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 11/12] atm: eni: " Arvind Yadav
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  16884	    444	     28	  17356	   43cc	drivers/atm/firestream.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  16980	    348	     28	  17356	   43cc	drivers/atm/firestream.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/firestream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 22dcab9..6b6368a 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -2030,7 +2030,7 @@ static void firestream_remove_one(struct pci_dev *pdev)
 	func_exit ();
 }
 
-static struct pci_device_id firestream_pci_tbl[] = {
+static const struct pci_device_id firestream_pci_tbl[] = {
 	{ PCI_VDEVICE(FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS50), FS_IS50},
 	{ PCI_VDEVICE(FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS155), FS_IS155},
 	{ 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 11/12] atm: eni: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (9 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 10/12] atm: firestream: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16  9:32 ` [PATCH 12/12] atm: idt77252: " Arvind Yadav
  2017-07-16 23:38 ` [PATCH 00/12] constify atm pci_device_id David Miller
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  21565	    352	     56	  21973	   55d5	drivers/atm/eni.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  21661	    256	     56	  21973	   55d5	drivers/atm/eni.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/eni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index b042ec4..ce47eb1 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -2292,7 +2292,7 @@ static int eni_init_one(struct pci_dev *pci_dev,
 }
 
 
-static struct pci_device_id eni_pci_tbl[] = {
+static const struct pci_device_id eni_pci_tbl[] = {
 	{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_FPGA), 0 /* FPGA */ },
 	{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_ASIC), 1 /* ASIC */ },
 	{ 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 12/12] atm: idt77252: constify pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (10 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 11/12] atm: eni: " Arvind Yadav
@ 2017-07-16  9:32 ` Arvind Yadav
  2017-07-16 23:38 ` [PATCH 00/12] constify atm pci_device_id David Miller
  12 siblings, 0 replies; 14+ messages in thread
From: Arvind Yadav @ 2017-07-16  9:32 UTC (permalink / raw)
  To: 3chas3, netdev, linux-kernel, linux-atm-general

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
  27702	    468	     16	  28186	   6e1a	drivers/atm/idt77252.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  27766	    404	     16	  28186	   6e1a	drivers/atm/idt77252.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/idt77252.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 60bacba..b7a168c 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3725,7 +3725,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
 	return err;
 }
 
-static struct pci_device_id idt77252_pci_tbl[] =
+static const struct pci_device_id idt77252_pci_tbl[] =
 {
 	{ PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77252), 0 },
 	{ 0, }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 00/12] constify atm pci_device_id.
  2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
                   ` (11 preceding siblings ...)
  2017-07-16  9:32 ` [PATCH 12/12] atm: idt77252: " Arvind Yadav
@ 2017-07-16 23:38 ` David Miller
  12 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2017-07-16 23:38 UTC (permalink / raw)
  To: arvind.yadav.cs; +Cc: 3chas3, netdev, linux-kernel, linux-atm-general

From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Sun, 16 Jul 2017 15:02:28 +0530

> 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.

Series applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-07-16 23:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-16  9:32 [PATCH 00/12] constify atm pci_device_id Arvind Yadav
2017-07-16  9:32 ` [PATCH 01/12] atm: iphase: constify pci_device_id Arvind Yadav
2017-07-16  9:32 ` [PATCH 02/12] atm: ambassador: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 03/12] atm: fore200e: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 04/12] atm: nicstar: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 05/12] atm: he: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 06/12] atm: horizon: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 07/12] atm: solos-pci: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 08/12] atm: lanai: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 09/12] atm: zatm: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 10/12] atm: firestream: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 11/12] atm: eni: " Arvind Yadav
2017-07-16  9:32 ` [PATCH 12/12] atm: idt77252: " Arvind Yadav
2017-07-16 23:38 ` [PATCH 00/12] constify atm pci_device_id David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).