All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: Silence a few warnings with LPAE=y
@ 2013-11-13  7:16 Olof Johansson
       [not found] ` <1384327010-8870-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2013-11-13  7:16 UTC (permalink / raw)
  To: airlied-H+wXaHxf7aLQT0dZR+AlfA
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Arto Merilainen,
	tbergstrom-DDmLM1+adcrQT0dZR+AlfA,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w, Olof Johansson

When building with LPAE=y (64-bit dma_addr_t), the following warnings are seen:

drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format '%x' expects
  argument of type 'unsigned int', but argument 5 has type 'dma_addr_t'

drivers/gpu/host1x/hw/debug_hw.c:167:10: warning: format '%x' expects
  argument of type 'unsigned int', but argument 3 has type 'dma_addr_t'

The agreed-to solution for this is upcast to u64 and using %llx.

Signed-off-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
---
 drivers/gpu/host1x/hw/cdma_hw.c  |    4 ++--
 drivers/gpu/host1x/hw/debug_hw.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/host1x/hw/cdma_hw.c b/drivers/gpu/host1x/hw/cdma_hw.c
index 37e2a63..6b09b71 100644
--- a/drivers/gpu/host1x/hw/cdma_hw.c
+++ b/drivers/gpu/host1x/hw/cdma_hw.c
@@ -54,8 +54,8 @@ static void cdma_timeout_cpu_incr(struct host1x_cdma *cdma, u32 getptr,
 		u32 *p = (u32 *)((u32)pb->mapped + getptr);
 		*(p++) = HOST1X_OPCODE_NOP;
 		*(p++) = HOST1X_OPCODE_NOP;
-		dev_dbg(host1x->dev, "%s: NOP at 0x%x\n", __func__,
-			pb->phys + getptr);
+		dev_dbg(host1x->dev, "%s: NOP at %#llx\n", __func__,
+			(u64)pb->phys + getptr);
 		getptr = (getptr + 8) & (pb->size_bytes - 1);
 	}
 	wmb();
diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
index 640c75c..f72c873 100644
--- a/drivers/gpu/host1x/hw/debug_hw.c
+++ b/drivers/gpu/host1x/hw/debug_hw.c
@@ -163,8 +163,8 @@ static void show_channel_gathers(struct output *o, struct host1x_cdma *cdma)
 				continue;
 			}
 
-			host1x_debug_output(o, "    GATHER at %08x+%04x, %d words\n",
-					    g->base, g->offset, g->words);
+			host1x_debug_output(o, "    GATHER at %#llx+%04x, %d words\n",
+					    (u64)g->base, g->offset, g->words);
 
 			show_gather(o, g->base + g->offset, g->words, cdma,
 				    g->base, mapped);
-- 
1.7.10.4

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

* Re: [PATCH] gpu: host1x: Silence a few warnings with LPAE=y
       [not found] ` <1384327010-8870-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
@ 2013-12-03 10:09   ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2013-12-03 10:09 UTC (permalink / raw)
  To: Olof Johansson
  Cc: airlied-H+wXaHxf7aLQT0dZR+AlfA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Arto Merilainen,
	tbergstrom-DDmLM1+adcrQT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

On Tue, Nov 12, 2013 at 11:16:50PM -0800, Olof Johansson wrote:
> When building with LPAE=y (64-bit dma_addr_t), the following warnings are seen:
> 
> drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format '%x' expects
>   argument of type 'unsigned int', but argument 5 has type 'dma_addr_t'
> 
> drivers/gpu/host1x/hw/debug_hw.c:167:10: warning: format '%x' expects
>   argument of type 'unsigned int', but argument 3 has type 'dma_addr_t'
> 
> The agreed-to solution for this is upcast to u64 and using %llx.
> 
> Signed-off-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
> ---
>  drivers/gpu/host1x/hw/cdma_hw.c  |    4 ++--
>  drivers/gpu/host1x/hw/debug_hw.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-12-03 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13  7:16 [PATCH] gpu: host1x: Silence a few warnings with LPAE=y Olof Johansson
     [not found] ` <1384327010-8870-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2013-12-03 10:09   ` Thierry Reding

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.