drm/i915: Fix pointer-to-int conversion
Commit faf654864b
("drm/i915: Unify uC variable types to avoid
flooding checkpatch.pl") breaks 32-bit kernel builds. Lets use
cast helper to make compiler happy.
v2: introduce ptr_to_u64 (Chris)
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171006130844.49012-1-michal.wajdeczko@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:

committed by
Chris Wilson

parent
ead92edbd6
commit
bb8920f5be
@@ -99,6 +99,11 @@
|
||||
__T; \
|
||||
})
|
||||
|
||||
static inline u64 ptr_to_u64(const void *ptr)
|
||||
{
|
||||
return (uintptr_t)ptr;
|
||||
}
|
||||
|
||||
#define u64_to_ptr(T, x) ({ \
|
||||
typecheck(u64, x); \
|
||||
(T *)(uintptr_t)(x); \
|
||||
|
Reference in New Issue
Block a user