]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/xen-front: fix pointer casts
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Wed, 23 May 2018 11:36:30 +0000 (14:36 +0300)
committerOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Fri, 25 May 2018 05:28:41 +0000 (08:28 +0300)
Building for a 32-bit target results in warnings from casting
between a 32-bit pointer and a 64-bit integer. Fix the warnings
by casting those pointers to uintptr_t first.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180523113630.29811-1-andr2000@gmail.com
drivers/gpu/drm/xen/xen_drm_front.h
drivers/gpu/drm/xen/xen_drm_front_shbuf.c

index 2c2479b571ae6baf56c7f736c8f587c51227da0f..5693b4a4b02b1a951d897f30bd60bf2e74a6297d 100644 (file)
@@ -126,12 +126,12 @@ struct xen_drm_front_drm_info {
 
 static inline u64 xen_drm_front_fb_to_cookie(struct drm_framebuffer *fb)
 {
-       return (u64)fb;
+       return (uintptr_t)fb;
 }
 
 static inline u64 xen_drm_front_dbuf_to_cookie(struct drm_gem_object *gem_obj)
 {
-       return (u64)gem_obj;
+       return (uintptr_t)gem_obj;
 }
 
 int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
index 8099cb343ae3bef389a2718c1fc34f50c737c73f..d333b67cc1a06b4cbfe838ddf3ab4245c1de3ae1 100644 (file)
@@ -122,7 +122,7 @@ static void guest_calc_num_grefs(struct xen_drm_front_shbuf *buf)
 }
 
 #define xen_page_to_vaddr(page) \
-               ((phys_addr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
+               ((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
 
 static int backend_unmap(struct xen_drm_front_shbuf *buf)
 {