netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: 3chas3@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-atm-general@lists.sourceforge.net
Subject: [PATCH 09/12] atm: zatm: constify pci_device_id.
Date: Sun, 16 Jul 2017 15:02:37 +0530	[thread overview]
Message-ID: <1500197560-14623-10-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1500197560-14623-1-git-send-email-arvind.yadav.cs@gmail.com>

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

  parent reply	other threads:[~2017-07-16  9:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Arvind Yadav [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500197560-14623-10-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=3chas3@gmail.com \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).