[PATCH 4/5] drm/xe: make gpuvm_ops const

Thomas Hellström thomas.hellstrom at linux.intel.com
Wed Jan 17 12:38:52 UTC 2024


On Wed, 2024-01-17 at 14:20 +0200, Jani Nikula wrote:
> Place the function pointers in rodata.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>

> ---
>  drivers/gpu/drm/xe/xe_vm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 10b6995fbf29..64558a95418c 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -1054,7 +1054,7 @@ static struct drm_gpuva_op
> *xe_vm_op_alloc(void)
>  
>  static void xe_vm_free(struct drm_gpuvm *gpuvm);
>  
> -static struct drm_gpuvm_ops gpuvm_ops = {
> +static const struct drm_gpuvm_ops gpuvm_ops = {
>  	.op_alloc = xe_vm_op_alloc,
>  	.vm_bo_validate = xe_gpuvm_validate,
>  	.vm_free = xe_vm_free,



More information about the Intel-xe mailing list