Skip to content

Commit

Permalink
drm/radeon: Constify struct pci_device_id
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Christophe JAILLET authored and Alex Deucher committed Nov 20, 2024
1 parent e283f4f commit c3e3c1a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c3e3c1a

Please sign in to comment.