Skip to content

Commit b6d4abc

Browse files
rikardfalkebornChristianKoenigAMD
authored andcommitted
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 <[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 fff72bb commit b6d4abc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/radeon/radeon_ttm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ static vm_fault_t radeon_ttm_fault(struct vm_fault *vmf)
838838
return ret;
839839
}
840840

841-
static struct vm_operations_struct radeon_ttm_vm_ops = {
841+
static const struct vm_operations_struct radeon_ttm_vm_ops = {
842842
.fault = radeon_ttm_fault,
843843
.open = ttm_bo_vm_open,
844844
.close = ttm_bo_vm_close,

0 commit comments

Comments
 (0)