diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-11-15 18:26:06 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-11-20 10:03:05 -0500 |
commit | c3e3c1aac0bf25e0f3f9b1557766fc9b89fb318b (patch) | |
tree | b527548885976c7103d41cab02be9e0295fc80c4 /drivers/gpu/drm | |
parent | e283f4fb0862647f4bb02e78d728bc8fb9eef18d (diff) |
drm/radeon: Constify struct pci_device_id
'struct pci_device_id' is not modified in this driver.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
11984 28672 44 40700 9efc drivers/gpu/drm/radeon/radeon_drv.o
After:
=====
text data bss dec hex filename
40000 664 44 40708 9f04 drivers/gpu/drm/radeon/radeon_drv.o
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 23d6d1a2586d..5e958cc223f4 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -248,10 +248,9 @@ int radeon_cik_support = 1; MODULE_PARM_DESC(cik_support, "CIK support (1 = enabled (default), 0 = disabled)"); module_param_named(cik_support, radeon_cik_support, int, 0444); -static struct pci_device_id pciidlist[] = { +static const struct pci_device_id pciidlist[] = { radeon_PCI_IDS }; - MODULE_DEVICE_TABLE(pci, pciidlist); static const struct drm_driver kms_driver; |