[Intel-gfx] [PATCH] drm/i915: Fix __user sparse warning

Daniel Vetter daniel at ffwll.ch
Fri Jun 13 16:06:47 CEST 2014


On Fri, Jun 13, 2014 at 04:42:51PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> CHECK   linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c:1529:47: warning: incorrect type in initializer (different address spaces)
> linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c:1529:47:    expected struct drm_i915_gem_exec_object2 *user_exec_list
> linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c:1529:47:    got void [noderef] <asn:1>*
> linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c:1533:61: warning: incorrect type in argument 1 (different address spaces)
> linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c:1533:61:    expected void [noderef] <asn:1>*dst
> linux/drivers/gpu/drm/i915/i915_gem_execbuffer.c:1533:61:    got unsigned long long *<noident>
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 3a30133..93d7f72 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1525,7 +1525,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
>  	ret = i915_gem_do_execbuffer(dev, data, file, args, exec2_list);
>  	if (!ret) {
>  		/* Copy the new buffer offsets back to the user's exec list. */
> -		struct drm_i915_gem_exec_object2 *user_exec_list =
> +		struct drm_i915_gem_exec_object2 __user *user_exec_list =
>  				   to_user_ptr(args->buffers_ptr);
>  		int i;
>  
> -- 
> 1.8.5.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list