lkml.org 
[lkml]   [2017]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drm: vmwgfx: constify vmw_fence_ops
From
Date
On 08/30/2017 07:47 AM, Arvind Yadav wrote:
> vmw_fence_ops are not supposed to change at runtime. Functions
> "dma_fence_init" working with const vmw_fence_ops provided
> by <linux/dma-fence.h>. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> index b8bc5bc..abc5f03 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> @@ -225,7 +225,7 @@ static long vmw_fence_wait(struct dma_fence *f, bool intr, signed long timeout)
> return ret;
> }
>
> -static struct dma_fence_ops vmw_fence_ops = {
> +static const struct dma_fence_ops vmw_fence_ops = {
> .get_driver_name = vmw_fence_get_driver_name,
> .get_timeline_name = vmw_fence_get_timeline_name,
> .enable_signaling = vmw_fence_enable_signaling,

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>


\
 
 \ /
  Last update: 2017-08-30 08:22    [W:0.062 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site