[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <039846c0278276e7c652395730f36051216fd4c3.1731691556.git.christophe.jaillet@wanadoo.fr>
Date: Fri, 15 Nov 2024 18:26:06 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: linux@...ssschuh.net,
broonie@...nel.org,
lee@...nel.org,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
Xinhui Pan <Xinhui.Pan@....com>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org
Subject: [PATCH] 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
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
Compile tested-only.
---
drivers/gpu/drm/radeon/radeon_drv.c | 3 +--
1 file changed, 1 insertion(+), 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;
--
2.47.0
Powered by blists - more mailing lists