From: Rikard Falkeborn Date: Tue, 9 Feb 2021 23:48:15 +0000 (+0100) Subject: drm/amdgpu/ttm: constify static vm_operations_struct X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fff72bb569ee97a5dafe287e6b9ff4ecdf4f6d6d;p=linux.git drm/amdgpu/ttm: constify static vm_operations_struct The only usage of amdgpu_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-2-rikard.falkeborn@gmail.com Signed-off-by: Christian König --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 29cfb0809634e..a785acc09f206 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -2002,7 +2002,7 @@ unlock: return ret; } -static struct vm_operations_struct amdgpu_ttm_vm_ops = { +static const struct vm_operations_struct amdgpu_ttm_vm_ops = { .fault = amdgpu_ttm_fault, .open = ttm_bo_vm_open, .close = ttm_bo_vm_close,