Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbdGOHRa (ORCPT ); Sat, 15 Jul 2017 03:17:30 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33117 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbdGOHR3 (ORCPT ); Sat, 15 Jul 2017 03:17:29 -0400 From: Arvind Yadav To: airlied@linux.ie, linux-kernel@vger.kernel.org, bskeggs@redhat.com, nouveau@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 3/5] drm: nouveau: constify pci_device_id. Date: Sat, 15 Jul 2017 12:47:16 +0530 Message-Id: <1500103036-23429-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: 1080 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 12256 360 976 13592 3518 gpu/drm/nouveau/nouveau_drm.o File size After adding 'const': text data bss dec hex filename 12360 256 976 13592 3518 gpu/drm/nouveau/nouveau_drm.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 15a13d0..07a1efb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -1019,7 +1019,7 @@ driver_stub = { .patchlevel = DRIVER_PATCHLEVEL, }; -static struct pci_device_id +static const struct pci_device_id nouveau_drm_pci_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID), -- 2.7.4