Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755434AbdGWKDa (ORCPT ); Sun, 23 Jul 2017 06:03:30 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36724 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbdGWKBg (ORCPT ); Sun, 23 Jul 2017 06:01:36 -0400 From: Arvind Yadav To: gregkh@linuxfoundation.org, jirislaby@gmail.com, jslaby@suse.com, gpiccoli@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 3/9] tty: synclinkmp: constify pci_device_id. Date: Sun, 23 Jul 2017 15:31:03 +0530 Message-Id: <1500804069-11043-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500804069-11043-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500804069-11043-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 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 44660 432 104 45196 b08c drivers/tty/synclinkmp.o File size After adding 'const': text data bss dec hex filename 44756 336 104 45196 b08c drivers/tty/synclinkmp.o Signed-off-by: Arvind Yadav --- drivers/tty/synclinkmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index 9b4fb02..4fed9e7 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c @@ -479,7 +479,7 @@ static char *driver_version = "$Revision: 4.38 $"; static int synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent); static void synclinkmp_remove_one(struct pci_dev *dev); -static struct pci_device_id synclinkmp_pci_tbl[] = { +static const struct pci_device_id synclinkmp_pci_tbl[] = { { PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_SCA, PCI_ANY_ID, PCI_ANY_ID, }, { 0, }, /* terminate list */ }; -- 2.7.4