mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	aditr@vmware.com, pv-drivers@vmware.com, sean.hefty@intel.com,
	dledford@redhat.com, hal.rosenstock@gmail.com
Subject: [PATCH 2/3] infiniband: nes: constify pci_device_id.
Date: Sun, 16 Jul 2017 12:00:45 +0530	[thread overview]
Message-ID: <1500186646-28815-3-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1500186646-28815-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
  10429	    780	     33	  11242	   2bea	drivers/infiniband/hw/nes/nes.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  10541	    668	     33	  11242	   2bea	drivers/infiniband/hw/nes/nes.o

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

diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index a30aa65..a47595c 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -102,7 +102,7 @@ static unsigned int ee_flsh_adapter;
 static unsigned int sysfs_nonidx_addr;
 static unsigned int sysfs_idx_addr;
 
-static struct pci_device_id nes_pci_table[] = {
+static const struct pci_device_id nes_pci_table[] = {
 	{ PCI_VDEVICE(NETEFFECT, PCI_DEVICE_ID_NETEFFECT_NE020), },
 	{ PCI_VDEVICE(NETEFFECT, PCI_DEVICE_ID_NETEFFECT_NE020_KR), },
 	{0}
-- 
2.7.4

  parent reply	other threads:[~2017-07-16  6:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-16  6:30 [PATCH 0/3] constify infiniband pci_device_id Arvind Yadav
2017-07-16  6:30 ` [PATCH 1/3] infiniband: mthca: constify pci_device_id Arvind Yadav
2017-07-16  6:30 ` Arvind Yadav [this message]
2017-07-16  6:30 ` [PATCH 3/3] infiniband: pvrdma: " Arvind Yadav
2017-08-18 16:03 ` [PATCH 0/3] constify infiniband pci_device_id Doug Ledford

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=1500186646-28815-3-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=aditr@vmware.com \
    --cc=dledford@redhat.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=sean.hefty@intel.com \
    /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

Powered by JetHome