Skip to contentSkip to conversation

dmaengine: ipu: fix warnings from 64-bit dma_addr_t printouts

PATCH In review Olof Johansson 2 participants 3 messages Nov 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dmaengine: ipu: fix warnings from 64-bit dma_addr_t printouts

This resolves a number of warnings such as the below when building with 64-bit dma_addr_t on arm:

drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format '%x' expects argument
of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]

..by upcasting to u64 and using %llx.

---
 drivers/dma/ipu/ipu_idmac.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/dma/ipu/ipu_idmac.c +4 -2
index cb9c0bc..128ca14 100644
@@ -1232,8 +1232,10 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
 	desc = list_entry(ichan->queue.next, struct idmac_tx_desc, list);
 	descnew = desc;
 
-	dev_dbg(dev, "IDMAC irq %d, dma 0x%08x, next dma 0x%08x, current %d, curbuf 0x%08x\n",
-		irq, sg_dma_address(*sg), sgnext ? sg_dma_address(sgnext) : 0, ichan->active_buffer, curbuf);
+	dev_dbg(dev, "IDMAC irq %d, dma %#llx, next dma %#llx, current %d, curbuf %#x\n",
+		irq, (u64)sg_dma_address(*sg),
+		sgnext ? (u64)sg_dma_address(sgnext) : 0,
+		ichan->active_buffer, curbuf);
 
 	/* Find the descriptor of sgnext */
 	sgnew = idmac_sg_next(ichan, &descnew, *sg);
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 dma: imx-sdma: Fix warnings for LPAE builds

This resolves a number of warnings such as the below when building with 64-bit dma_addr_t on arm:

drivers/dma/imx-sdma.c:1092:3: warning: format '%x' expects argument of
type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]

..by upcasting to u64 and using %llx.

---
 drivers/dma/imx-sdma.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/dma/imx-sdma.c +4 -4
index e43c040..4088ff8 100644
@@ -1089,8 +1089,8 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
 			param &= ~BD_CONT;
 		}
 
-		dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%08x %s%s\n",
-				i, count, sg->dma_address,
+		dev_dbg(sdma->dev, "entry %d: count: %d dma: %#llx %s%s\n",
+				i, count, (u64)sg->dma_address,
 				param & BD_WRAP ? "wrap" : "",
 				param & BD_INTR ? " intr" : "");
 
@@ -1163,8 +1163,8 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
 		if (i + 1 == num_periods)
 			param |= BD_WRAP;
 
-		dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%08x %s%s\n",
-				i, period_len, dma_addr,
+		dev_dbg(sdma->dev, "entry %d: count: %d dma: %#llx %s%s\n",
+				i, period_len, (u64)dma_addr,
 				param & BD_WRAP ? "wrap" : "",
 				param & BD_INTR ? " intr" : "");
 
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Olof Johansson
Quoted 7 lines · Olof Johansson

This resolves a number of warnings such as the below when building with 64-bit dma_addr_t on arm:

drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format '%x' expects argument
of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]

..by upcasting to u64 and using %llx.

Applied both

Thanks
~Vinod

Quoted 30 lines
---
 drivers/dma/ipu/ipu_idmac.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/dma/ipu/ipu_idmac.c +4 -2
index cb9c0bc..128ca14 100644
@@ -1232,8 +1232,10 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
 	desc = list_entry(ichan->queue.next, struct idmac_tx_desc, list);
 	descnew = desc;
 
-	dev_dbg(dev, "IDMAC irq %d, dma 0x%08x, next dma 0x%08x, current %d, curbuf 0x%08x\n",
-		irq, sg_dma_address(*sg), sgnext ? sg_dma_address(sgnext) : 0, ichan->active_buffer, curbuf);
+	dev_dbg(dev, "IDMAC irq %d, dma %#llx, next dma %#llx, current %d, curbuf %#x\n",
+		irq, (u64)sg_dma_address(*sg),
+		sgnext ? (u64)sg_dma_address(sgnext) : 0,
+		ichan->active_buffer, curbuf);
 
 	/* Find the descriptor of sgnext */
 	sgnew = idmac_sg_next(ichan, &descnew, *sg);
Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html