From: Rikard Falkeborn Date: Tue, 9 Feb 2021 23:48:16 +0000 (+0100) Subject: drm/radeon/ttm: constify static vm_operations_struct X-Git-Tag: v5.13-rc1~123^2~14^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6d4abc9ae627b071fef91c64a5ad8f884bbbc45;p=thirdparty%2Fkernel%2Flinux.git drm/radeon/ttm: constify static vm_operations_struct The only usage of radeon_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-3-rikard.falkeborn@gmail.com Signed-off-by: Christian König --- diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 5ed6a48246d6f..4f05a3f95e1ea 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -838,7 +838,7 @@ unlock_mclk: return ret; } -static struct vm_operations_struct radeon_ttm_vm_ops = { +static const struct vm_operations_struct radeon_ttm_vm_ops = { .fault = radeon_ttm_fault, .open = ttm_bo_vm_open, .close = ttm_bo_vm_close,