From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: airlied@linux.ie, amd-gfx@lists.freedesktop.org,
alexander.deucher@amd.com, dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] drm: radeon: constify pci_device_id.
Date: Sat, 15 Jul 2017 12:42:18 +0530 [thread overview]
Message-ID: <1500102738-23274-2-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1500102738-23274-1-git-send-email-arvind.yadav.cs@gmail.com>
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> 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 <arvind.yadav.cs@gmail.com>
---
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
};
--
2.7.4
next prev parent reply other threads:[~2017-07-15 7:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-15 7:12 [PATCH 0/5] constify drm pci_device_id Arvind Yadav
2017-07-15 7:12 ` Arvind Yadav [this message]
2017-07-15 13:47 ` [PATCH 1/5] drm: radeon: constify pci_device_id Christian König
2017-07-16 6:10 ` arvind
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500102738-23274-2-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox