Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1689216 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-07-17 18:10 +0200 |
| Last post | 2017-07-18 18:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] dmaengine: ioat: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-17 18:10 +0200
Re: [PATCH] dmaengine: ioat: constify pci_device_id. Vinod Koul <vinod.koul@intel.com> - 2017-07-18 18:00 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-07-17 18:10 +0200 |
| Subject | [PATCH] dmaengine: ioat: constify pci_device_id. |
| Message-ID | <u4gKT-7hy-49@gated-at.bofh.it> |
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
12582 3056 16 15654 3d26 drivers/dma/ioat/init.o
File size After adding 'const':
text data bss dec hex filename
14773 865 16 15654 3d26 drivers/dma/ioat/init.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/dma/ioat/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
index ed8ed11..93e006c 100644
--- a/drivers/dma/ioat/init.c
+++ b/drivers/dma/ioat/init.c
@@ -39,7 +39,7 @@ MODULE_VERSION(IOAT_DMA_VERSION);
MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Intel Corporation");
-static struct pci_device_id ioat_pci_tbl[] = {
+static const struct pci_device_id ioat_pci_tbl[] = {
/* I/OAT v3 platforms */
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_TBG0) },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_TBG1) },
--
2.7.4
[toc] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2017-07-18 18:00 +0200 |
| Message-ID | <u4D4K-4gb-13@gated-at.bofh.it> |
| In reply to | #1689216 |
On Mon, Jul 17, 2017 at 09:39:00PM +0530, Arvind Yadav wrote: > 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 > 12582 3056 16 15654 3d26 drivers/dma/ioat/init.o > > File size After adding 'const': > text data bss dec hex filename > 14773 865 16 15654 3d26 drivers/dma/ioat/init.o Applied, thanks -- ~Vinod
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web