From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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 [thread overview]
Message-ID: <1500103036-23429-1-git-send-email-arvind.yadav.cs@gmail.com> (raw)
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
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 <arvind.yadav.cs@gmail.com>
---
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
reply other threads:[~2017-07-15 7:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1500103036-23429-1-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.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
all inboxes | Powered by JetHome®