Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751164AbdGOHWE (ORCPT ); Sat, 15 Jul 2017 03:22:04 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36251 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbdGOHWD (ORCPT ); Sat, 15 Jul 2017 03:22:03 -0400 From: Arvind Yadav To: airlied@linux.ie, linux-kernel@vger.kernel.org, bskeggs@redhat.com Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 4/5] drm: via: constify pci_device_id. Date: Sat, 15 Jul 2017 12:51:53 +0530 Message-Id: <1500103313-23529-1-git-send-email-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: 1057 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 493 1072 0 1565 61d drivers/gpu/drm/via/via_drv.o File size After adding 'const': text data bss dec hex filename 821 744 0 1565 61d drivers/gpu/drm/via/via_drv.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/via/via_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c index 9e0e539..f58a473 100644 --- a/drivers/gpu/drm/via/via_drv.c +++ b/drivers/gpu/drm/via/via_drv.c @@ -53,7 +53,7 @@ static void via_driver_postclose(struct drm_device *dev, struct drm_file *file) kfree(file_priv); } -static struct pci_device_id pciidlist[] = { +static const struct pci_device_id pciidlist[] = { viadrv_PCI_IDS }; -- 2.7.4