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 3/3] infiniband: pvrdma: constify pci_device_id.
Date: Sun, 16 Jul 2017 12:00:46 +0530 [thread overview]
Message-ID: <1500186646-28815-4-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
10774 1872 8 12654 316e infiniband/hw/vmw_pvrdma/pvrdma_main.o
File size After adding 'const':
text data bss dec hex filename
10838 1808 8 12654 316e infiniband/hw/vmw_pvrdma/pvrdma_main.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
index 34ebc76..2b83530 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
@@ -1078,7 +1078,7 @@ static void pvrdma_pci_remove(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
}
-static struct pci_device_id pvrdma_pci_table[] = {
+static const struct pci_device_id pvrdma_pci_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_VMWARE, PCI_DEVICE_ID_VMWARE_PVRDMA), },
{ 0 },
};
--
2.7.4
next prev 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 ` [PATCH 2/3] infiniband: nes: " Arvind Yadav
2017-07-16 6:30 ` Arvind Yadav [this message]
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-4-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