Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbdGPGsL (ORCPT ); Sun, 16 Jul 2017 02:48:11 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34877 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbdGPGsK (ORCPT ); Sun, 16 Jul 2017 02:48:10 -0400 From: Arvind Yadav To: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, felipe.balbi@linux.intel.com Subject: [PATCH] usb: gadget: udc: net2272: constify pci_device_id. Date: Sun, 16 Jul 2017 12:17:45 +0530 Message-Id: <71d310de470df7c8e991a4627d9d3d9889f818b3.1500187376.git.arvind.yadav.cs@gmail.com> 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: 1131 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 19453 2260 5 21718 54d6 drivers/usb/gadget/udc/net2272.o File size After adding 'const': text data bss dec hex filename 19549 2164 5 21718 54d6 drivers/usb/gadget/udc/net2272.o Signed-off-by: Arvind Yadav --- drivers/usb/gadget/udc/net2272.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 8f85a51..91ab2ad80 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c @@ -2556,7 +2556,7 @@ net2272_pci_remove(struct pci_dev *pdev) } /* Table of matching PCI IDs */ -static struct pci_device_id pci_ids[] = { +static const struct pci_device_id pci_ids[] = { { /* RDK 1 card */ .class = ((PCI_CLASS_BRIDGE_OTHER << 8) | 0xfe), .class_mask = 0, -- 2.7.4