'struct drm_info_list' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers.
On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 1411 320 0 1731 6c3 drivers/gpu/drm/armada/armada_debugfs.o After: ===== text data bss dec hex filename 1683 48 0 1731 6c3 drivers/gpu/drm/armada/armada_debugfs.o Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- Compile tested only --- drivers/gpu/drm/armada/armada_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/armada/armada_debugfs.c b/drivers/gpu/drm/armada/armada_debugfs.c index 96aebd56272f..f15b2143279f 100644 --- a/drivers/gpu/drm/armada/armada_debugfs.c +++ b/drivers/gpu/drm/armada/armada_debugfs.c @@ -98,7 +98,7 @@ void armada_drm_crtc_debugfs_init(struct armada_crtc *dcrtc) dcrtc, &armada_debugfs_crtc_reg_fops); } -static struct drm_info_list armada_debugfs_list[] = { +static const struct drm_info_list armada_debugfs_list[] = { { "gem_linear", armada_debugfs_gem_linear_show, 0 }, }; #define ARMADA_DEBUGFS_ENTRIES ARRAY_SIZE(armada_debugfs_list) -- 2.50.1