From: Rikard Falkeborn Date: Tue, 9 Feb 2021 23:48:17 +0000 (+0100) Subject: drm/nouveau/ttm: constify static vm_operations_struct X-Git-Tag: io_uring-5.13-2021-05-07~38^2~14^2~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=19bafac4f56f42c499e7343d884b7878204652d3;p=linux-block.git 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 Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-4-rikard.falkeborn@gmail.com Signed-off-by: Christian König --- diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 495288182c2d..b81ae90b8449 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -154,7 +154,7 @@ error_unlock: return ret; } -static struct vm_operations_struct nouveau_ttm_vm_ops = { +static const struct vm_operations_struct nouveau_ttm_vm_ops = { .fault = nouveau_ttm_fault, .open = ttm_bo_vm_open, .close = ttm_bo_vm_close,