Skip to content

Commit c3e3c1a

Browse files
tititiou36alexdeucher
authored andcommitted
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 <[email protected]> Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent e283f4f commit c3e3c1a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/radeon/radeon_drv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,9 @@ int radeon_cik_support = 1;
248248
MODULE_PARM_DESC(cik_support, "CIK support (1 = enabled (default), 0 = disabled)");
249249
module_param_named(cik_support, radeon_cik_support, int, 0444);
250250

251-
static struct pci_device_id pciidlist[] = {
251+
static const struct pci_device_id pciidlist[] = {
252252
radeon_PCI_IDS
253253
};
254-
255254
MODULE_DEVICE_TABLE(pci, pciidlist);
256255

257256
static const struct drm_driver kms_driver;

0 commit comments

Comments
 (0)