Skip to content

Commit 19bafac

Browse files
rikardfalkebornChristianKoenigAMD
authored andcommitted
drm/nouveau/ttm: constify static vm_operations_struct
The only usage of nouveau_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 b6d4abc commit 19bafac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_ttm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static vm_fault_t nouveau_ttm_fault(struct vm_fault *vmf)
154154
return ret;
155155
}
156156

157-
static struct vm_operations_struct nouveau_ttm_vm_ops = {
157+
static const struct vm_operations_struct nouveau_ttm_vm_ops = {
158158
.fault = nouveau_ttm_fault,
159159
.open = ttm_bo_vm_open,
160160
.close = ttm_bo_vm_close,

0 commit comments

Comments
 (0)