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 05/12] atm: he: constify pci_device_id.
Date: Sun, 16 Jul 2017 15:02:33 +0530	[thread overview]
Message-ID: <1500197560-14623-6-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
  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

  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 ` [PATCH 04/12] atm: nicstar: " Arvind Yadav
2017-07-16  9:32 ` Arvind Yadav [this message]
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-6-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®