* [PATCH] dmaengine: ioat: constify pci_device_id.
@ 2017-07-17 16:09 Arvind Yadav
2017-07-18 16:02 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-07-17 16:09 UTC (permalink / raw)
To: vinod.koul, dan.j.williams, dave.jiang; +Cc: dmaengine, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: ioat: constify pci_device_id.
2017-07-17 16:09 [PATCH] dmaengine: ioat: constify pci_device_id Arvind Yadav
@ 2017-07-18 16:02 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2017-07-18 16:02 UTC (permalink / raw)
To: Arvind Yadav; +Cc: dan.j.williams, dave.jiang, dmaengine, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-18 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 16:09 [PATCH] dmaengine: ioat: constify pci_device_id Arvind Yadav
2017-07-18 16:02 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox