mirror of https://lore.kernel.org/lkml/
 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 04/12] atm: nicstar: constify pci_device_id.
Date: Sun, 16 Jul 2017 15:02:32 +0530	[thread overview]
Message-ID: <1500197560-14623-5-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
  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

  parent reply	other threads:[~2017-07-16  9:36 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 ` Arvind Yadav [this message]
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

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

all inboxes | Powered by JetHome®