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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux