Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbdGQQJO (ORCPT ); Mon, 17 Jul 2017 12:09:14 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36389 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbdGQQJM (ORCPT ); Mon, 17 Jul 2017 12:09:12 -0400 From: Arvind Yadav To: vinod.koul@intel.com, dan.j.williams@intel.com, dave.jiang@intel.com Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: ioat: constify pci_device_id. Date: Mon, 17 Jul 2017 21:39:00 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1140 Lines: 32 pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by 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 --- 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