Skip to content

Commit fff72bb

Browse files
rikardfalkebornChristianKoenigAMD
authored andcommitted
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 <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
1 parent 2eebbdb commit fff72bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ static vm_fault_t amdgpu_ttm_fault(struct vm_fault *vmf)
20022002
return ret;
20032003
}
20042004

2005-
static struct vm_operations_struct amdgpu_ttm_vm_ops = {
2005+
static const struct vm_operations_struct amdgpu_ttm_vm_ops = {
20062006
.fault = amdgpu_ttm_fault,
20072007
.open = ttm_bo_vm_open,
20082008
.close = ttm_bo_vm_close,

0 commit comments

Comments
 (0)