File 0021-drm-msm-Add-u64_to_user_ptr.patch of Package drm.openSUSE_Leap_42.3_Update

From: Takashi Iwai <tiwai@suse.de>
Subject: drm/msm: Add u64_to_user_ptr() macro

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/msm/msm_drv.h |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -43,6 +43,13 @@
 #include <drm/msm_drm.h>
 #include <drm/drm_gem.h>
 
+#define u64_to_user_ptr(x) (           \
+{                                      \
+	typecheck(u64, x);              \
+	(void __user *)(uintptr_t)x;    \
+}                                      \
+)
+
 struct msm_kms;
 struct msm_gpu;
 struct msm_mmu;