All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xen-front: fix pointer casts
@ 2018-05-23 11:36 Oleksandr Andrushchenko
  2018-05-23 11:46 ` Juergen Gross
  2018-05-23 11:46 ` Juergen Gross
  0 siblings, 2 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-23 11:36 UTC (permalink / raw)
  To: xen-devel, linux-kernel, dri-devel, daniel.vetter, jgross,
	boris.ostrovsky
  Cc: andr2000, Oleksandr Andrushchenko

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

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>
---
Changes since v1:
 - remove unneeded u64 and phys_addr_t casts (Juergen)

 drivers/gpu/drm/xen/xen_drm_front.h       | 4 ++--
 drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h
index 2c2479b571ae..5693b4a4b02b 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.h
+++ b/drivers/gpu/drm/xen/xen_drm_front.h
@@ -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,
diff --git a/drivers/gpu/drm/xen/xen_drm_front_shbuf.c b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
index 8099cb343ae3..d333b67cc1a0 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
@@ -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)
 {
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
  2018-05-23 11:36 [PATCH v2] drm/xen-front: fix pointer casts Oleksandr Andrushchenko
@ 2018-05-23 11:46 ` Juergen Gross
  2018-05-25  5:32   ` Oleksandr Andrushchenko
  2018-05-25  5:32     ` Oleksandr Andrushchenko
  2018-05-23 11:46 ` Juergen Gross
  1 sibling, 2 replies; 12+ messages in thread
From: Juergen Gross @ 2018-05-23 11:46 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, xen-devel, linux-kernel, dri-devel,
	daniel.vetter, boris.ostrovsky
  Cc: Oleksandr Andrushchenko

On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> 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>


Juergen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
  2018-05-23 11:36 [PATCH v2] drm/xen-front: fix pointer casts Oleksandr Andrushchenko
  2018-05-23 11:46 ` Juergen Gross
@ 2018-05-23 11:46 ` Juergen Gross
  1 sibling, 0 replies; 12+ messages in thread
From: Juergen Gross @ 2018-05-23 11:46 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, xen-devel, linux-kernel, dri-devel,
	daniel.vetter, boris.ostrovsky
  Cc: Oleksandr Andrushchenko

On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> 
> 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>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
  2018-05-23 11:46 ` Juergen Gross
@ 2018-05-25  5:32     ` Oleksandr Andrushchenko
  2018-05-25  5:32     ` Oleksandr Andrushchenko
  1 sibling, 0 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-25  5:32 UTC (permalink / raw)
  To: Juergen Gross, xen-devel, linux-kernel, dri-devel, daniel.vetter,
	boris.ostrovsky
  Cc: Oleksandr Andrushchenko

On 05/23/2018 02:46 PM, Juergen Gross wrote:
> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> 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>
Thank you, applied to drm-misc-next
>
> Juergen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
@ 2018-05-25  5:32     ` Oleksandr Andrushchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-25  5:32 UTC (permalink / raw)
  To: Juergen Gross, xen-devel, linux-kernel, dri-devel, daniel.vetter,
	boris.ostrovsky
  Cc: Oleksandr Andrushchenko

On 05/23/2018 02:46 PM, Juergen Gross wrote:
> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> 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>
Thank you, applied to drm-misc-next
>
> Juergen

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
  2018-05-23 11:46 ` Juergen Gross
@ 2018-05-25  5:32   ` Oleksandr Andrushchenko
  2018-05-25  5:32     ` Oleksandr Andrushchenko
  1 sibling, 0 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-25  5:32 UTC (permalink / raw)
  To: Juergen Gross, xen-devel, linux-kernel, dri-devel, daniel.vetter,
	boris.ostrovsky
  Cc: Oleksandr Andrushchenko

On 05/23/2018 02:46 PM, Juergen Gross wrote:
> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> 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>
Thank you, applied to drm-misc-next
>
> Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xen-devel] [PATCH v2] drm/xen-front: fix pointer casts
  2018-05-25  5:32     ` Oleksandr Andrushchenko
@ 2018-06-18 10:06       ` Andre Przywara
  -1 siblings, 0 replies; 12+ messages in thread
From: Andre Przywara @ 2018-06-18 10:06 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, Juergen Gross, xen-devel, linux-kernel,
	dri-devel, daniel.vetter, boris.ostrovsky
  Cc: Oleksandr Andrushchenko, David Airlie

Hi,

On 25/05/18 06:32, Oleksandr Andrushchenko wrote:
> On 05/23/2018 02:46 PM, Juergen Gross wrote:
>> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>>
>>> 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>

> Thank you, applied to drm-misc-next

Is this the right branch? Shouldn't this go to drm-misc-fixes instead,
so it reaches the tree before the 4.18 release?
Just stumbled over the issue when compiling 4.18-rc1 for arm32, so it
definitely needs fixing in this cycle.

Cheers,
Andre.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xen-devel] [PATCH v2] drm/xen-front: fix pointer casts
@ 2018-06-18 10:06       ` Andre Przywara
  0 siblings, 0 replies; 12+ messages in thread
From: Andre Przywara @ 2018-06-18 10:06 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, Juergen Gross, xen-devel, linux-kernel,
	dri-devel, daniel.vetter, boris.ostrovsky
  Cc: David Airlie, Oleksandr Andrushchenko

Hi,

On 25/05/18 06:32, Oleksandr Andrushchenko wrote:
> On 05/23/2018 02:46 PM, Juergen Gross wrote:
>> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>>
>>> 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>

> Thank you, applied to drm-misc-next

Is this the right branch? Shouldn't this go to drm-misc-fixes instead,
so it reaches the tree before the 4.18 release?
Just stumbled over the issue when compiling 4.18-rc1 for arm32, so it
definitely needs fixing in this cycle.

Cheers,
Andre.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
  2018-05-25  5:32     ` Oleksandr Andrushchenko
  (?)
@ 2018-06-18 10:06     ` Andre Przywara
  -1 siblings, 0 replies; 12+ messages in thread
From: Andre Przywara @ 2018-06-18 10:06 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, Juergen Gross, xen-devel, linux-kernel,
	dri-devel, daniel.vetter, boris.ostrovsky
  Cc: David Airlie, Oleksandr Andrushchenko

Hi,

On 25/05/18 06:32, Oleksandr Andrushchenko wrote:
> On 05/23/2018 02:46 PM, Juergen Gross wrote:
>> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>>
>>> 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>

> Thank you, applied to drm-misc-next

Is this the right branch? Shouldn't this go to drm-misc-fixes instead,
so it reaches the tree before the 4.18 release?
Just stumbled over the issue when compiling 4.18-rc1 for arm32, so it
definitely needs fixing in this cycle.

Cheers,
Andre.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Xen-devel] [PATCH v2] drm/xen-front: fix pointer casts
  2018-06-18 10:06       ` Andre Przywara
  (?)
  (?)
@ 2018-06-18 10:17       ` Oleksandr Andrushchenko
  -1 siblings, 0 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-06-18 10:17 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Andre Przywara, Oleksandr Andrushchenko, Juergen Gross,
	xen-devel, linux-kernel, dri-devel, daniel.vetter,
	boris.ostrovsky, David Airlie

On 06/18/2018 01:06 PM, Andre Przywara wrote:
> Hi,
>
> On 25/05/18 06:32, Oleksandr Andrushchenko wrote:
>> On 05/23/2018 02:46 PM, Juergen Gross wrote:
>>> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>>>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>>>
>>>> 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>
>> Thank you, applied to drm-misc-next
> Is this the right branch? Shouldn't this go to drm-misc-fixes instead,
> so it reaches the tree before the 4.18 release?
> Just stumbled over the issue when compiling 4.18-rc1 for arm32, so it
> definitely needs fixing in this cycle.
Maarten, can this be done please?
> Cheers,
> Andre.
Thank you,
Oleksandr

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/xen-front: fix pointer casts
  2018-06-18 10:06       ` Andre Przywara
  (?)
@ 2018-06-18 10:17       ` Oleksandr Andrushchenko
  -1 siblings, 0 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-06-18 10:17 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Juergen Gross, Oleksandr Andrushchenko, Andre Przywara,
	linux-kernel, dri-devel, David Airlie, daniel.vetter, xen-devel,
	boris.ostrovsky

On 06/18/2018 01:06 PM, Andre Przywara wrote:
> Hi,
>
> On 25/05/18 06:32, Oleksandr Andrushchenko wrote:
>> On 05/23/2018 02:46 PM, Juergen Gross wrote:
>>> On 23/05/18 13:36, Oleksandr Andrushchenko wrote:
>>>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>>>
>>>> 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>
>> Thank you, applied to drm-misc-next
> Is this the right branch? Shouldn't this go to drm-misc-fixes instead,
> so it reaches the tree before the 4.18 release?
> Just stumbled over the issue when compiling 4.18-rc1 for arm32, so it
> definitely needs fixing in this cycle.
Maarten, can this be done please?
> Cheers,
> Andre.
Thank you,
Oleksandr

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] drm/xen-front: fix pointer casts
@ 2018-05-23 11:36 Oleksandr Andrushchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Oleksandr Andrushchenko @ 2018-05-23 11:36 UTC (permalink / raw)
  To: xen-devel, linux-kernel, dri-devel, daniel.vetter, jgross,
	boris.ostrovsky
  Cc: andr2000, Oleksandr Andrushchenko

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

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>
---
Changes since v1:
 - remove unneeded u64 and phys_addr_t casts (Juergen)

 drivers/gpu/drm/xen/xen_drm_front.h       | 4 ++--
 drivers/gpu/drm/xen/xen_drm_front_shbuf.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h
index 2c2479b571ae..5693b4a4b02b 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.h
+++ b/drivers/gpu/drm/xen/xen_drm_front.h
@@ -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,
diff --git a/drivers/gpu/drm/xen/xen_drm_front_shbuf.c b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
index 8099cb343ae3..d333b67cc1a0 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_shbuf.c
@@ -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)
 {
-- 
2.17.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-18 10:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 11:36 [PATCH v2] drm/xen-front: fix pointer casts Oleksandr Andrushchenko
2018-05-23 11:46 ` Juergen Gross
2018-05-25  5:32   ` Oleksandr Andrushchenko
2018-05-25  5:32   ` Oleksandr Andrushchenko
2018-05-25  5:32     ` Oleksandr Andrushchenko
2018-06-18 10:06     ` Andre Przywara
2018-06-18 10:06     ` [Xen-devel] " Andre Przywara
2018-06-18 10:06       ` Andre Przywara
2018-06-18 10:17       ` Oleksandr Andrushchenko
2018-06-18 10:17       ` [Xen-devel] " Oleksandr Andrushchenko
2018-05-23 11:46 ` Juergen Gross
2018-05-23 11:36 Oleksandr Andrushchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.