[Intel-gfx] [PATCH] drm/i915: Fix a bogus cast in execbuffer2

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 22 14:47:49 CET 2013


On Fri, Feb 22, 2013 at 03:42:22PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> The pointer passed to copy_from_user() was cast to the wrong type. This
> doesn't cause any issues, but it confuses the reader. Just cast to
> void * like we do for the other execbuffer kernel<->user copies.

  static inline void __user *to_user_ptr(u64 address)
  {
	return (void __user *)(uintptr_t)address;
  }

That should tidy up this repeated idiom.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list