[PATCH] drm/i915: Make uapi/i915_drm.h standalone

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

 



In order for us to be able to simply copy our uapi/i915_drm.h into
userspace it must be compilable as-is by userspace. For which we need
to hide the sparse markup for __user. This does impose the limitation
that we include our uapi/i915_drm.h last so that the attribute is
properly defined inside the kernel.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 include/uapi/drm/i915_drm.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 202790a3e8e2..5b12506683f1 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -29,6 +29,11 @@
 
 #include "drm.h"
 
+/* Disable unused sparse attributes from userspace */
+#ifndef __user
+#define __user
+#endif
+
 #if defined(__cplusplus)
 extern "C" {
 #endif
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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