Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751230AbdGONyY (ORCPT ); Sat, 15 Jul 2017 09:54:24 -0400 Received: from vsmx009.vodafonemail.xion.oxcs.net ([153.92.174.87]:16108 "EHLO vsmx009.vodafonemail.xion.oxcs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbdGONyX (ORCPT ); Sat, 15 Jul 2017 09:54:23 -0400 X-Greylist: delayed 385 seconds by postgrey-1.27 at vger.kernel.org; Sat, 15 Jul 2017 09:54:22 EDT Subject: Re: [PATCH 1/5] drm: radeon: constify pci_device_id. To: Arvind Yadav , airlied@linux.ie, amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com, dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org References: <1500102738-23274-1-git-send-email-arvind.yadav.cs@gmail.com> <1500102738-23274-2-git-send-email-arvind.yadav.cs@gmail.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <94559aac-60b7-d2f9-7594-89e939980dd5@vodafone.de> Date: Sat, 15 Jul 2017 15:47:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1500102738-23274-2-git-send-email-arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-VADE-STATUS: LEGIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1516 Lines: 42 Am 15.07.2017 um 09:12 schrieb Arvind Yadav: > 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 > 6560 23212 72 29844 7494 gpu/drm/radeon/radeon_drv.o > > File size After adding 'const': > text data bss dec hex filename > 28960 812 72 29844 7494 gpu/drm/radeon/radeon_drv.o > > Signed-off-by: Arvind Yadav Impressive result for such a simple change. Patch is Reviewed-by: Christian König Are the PCI IDs already const in amdgpu or do we need a similar patch there as well? I only see patch 1 of 5 in my inbox. Christian. > --- > drivers/gpu/drm/radeon/radeon_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c > index e25cb51..b079937 100644 > --- a/drivers/gpu/drm/radeon/radeon_drv.c > +++ b/drivers/gpu/drm/radeon/radeon_drv.c > @@ -298,7 +298,7 @@ module_param_named(uvd, radeon_uvd, int, 0444); > MODULE_PARM_DESC(vce, "vce enable/disable vce support (1 = enable, 0 = disable)"); > module_param_named(vce, radeon_vce, int, 0444); > > -static struct pci_device_id pciidlist[] = { > +static const struct pci_device_id pciidlist[] = { > radeon_PCI_IDS > }; >