* [PATCH 5/5] drm: hisilicon: constify pci_device_id.
@ 2017-07-15 7:25 Arvind Yadav
2017-07-15 7:25 ` [PATCH 0/5] constify drm pci_device_id Arvind Yadav
0 siblings, 1 reply; 3+ messages in thread
From: Arvind Yadav @ 2017-07-15 7:25 UTC (permalink / raw)
To: airlied, linux-kernel, z.liuxinliang, zourongrong, puck.chen,
kong.kongxinwei
Cc: dri-devel
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
2704 808 0 3512 db8
gpu/drm/hisilicon/hibmc/hibmc_drm_drv.o
File size After adding 'const':
text data bss dec hex filename
2768 744 0 3512 db8
gpu/drm/hisilicon/hibmc/hibmc_drm_drv.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 2ffdbf9..a8c8186 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -401,7 +401,7 @@ static void hibmc_pci_remove(struct pci_dev *pdev)
drm_dev_unref(dev);
}
-static struct pci_device_id hibmc_pci_table[] = {
+static const struct pci_device_id hibmc_pci_table[] = {
{0x19e5, 0x1711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 0/5] constify drm pci_device_id
2017-07-15 7:25 [PATCH 5/5] drm: hisilicon: constify pci_device_id Arvind Yadav
@ 2017-07-15 7:25 ` Arvind Yadav
0 siblings, 0 replies; 3+ messages in thread
From: Arvind Yadav @ 2017-07-15 7:25 UTC (permalink / raw)
To: airlied, linux-kernel, z.liuxinliang, zourongrong, puck.chen,
kong.kongxinwei
Cc: dri-devel
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.
Arvind Yadav (5):
[PATCH 1/5] drm: radeon: constify pci_device_id.
[PATCH 2/5] drm: vmwgfx: constify pci_device_id.
[PATCH 3/5] drm: nouveau: constify pci_device_id.
[PATCH 4/5] drm: via: constify pci_device_id.
[PATCH 5/5] drm: hisilicon: constify pci_device_id.
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +-
drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
drivers/gpu/drm/via/via_drv.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 0/5] constify drm pci_device_id
@ 2017-07-15 7:12 Arvind Yadav
0 siblings, 0 replies; 3+ messages in thread
From: Arvind Yadav @ 2017-07-15 7:12 UTC (permalink / raw)
To: airlied, amd-gfx, alexander.deucher, dri-devel; +Cc: linux-kernel
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.
Arvind Yadav (5):
[PATCH 1/5] drm: radeon: constify pci_device_id.
[PATCH 2/5] drm: vmwgfx: constify pci_device_id.
[PATCH 3/5] drm: nouveau: constify pci_device_id.
[PATCH 4/5] drm: via: constify pci_device_id.
[PATCH 5/5] drm: hisilicon: constify pci_device_id.
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +-
drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
drivers/gpu/drm/via/via_drv.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-15 7:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-15 7:25 [PATCH 5/5] drm: hisilicon: constify pci_device_id Arvind Yadav
2017-07-15 7:25 ` [PATCH 0/5] constify drm pci_device_id Arvind Yadav
-- strict thread matches above, loose matches on Subject: below --
2017-07-15 7:12 Arvind Yadav
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®