Thread (9 messages) 9 messages, 3 authors, 2019-08-16

Re: crypto: hisilicon - Fix warning on printing %p with dma_addr_t

flat view

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2019-08-15 22:42:12

On Thu, Aug 15, 2019 at 10:17:37PM +0800, Zhou Wang wrote:
quoted
-	dev_dbg(&qm->pdev->dev, "QM mailbox request to q%u: %u-%pad\n", queue,
-		cmd, dma_addr);
+	dev_dbg(&qm->pdev->dev, "QM mailbox request to q%u: %u-%#lxad\n",
+		queue, cmd, (unsigned long)dma_addr);
Thanks. However, to be honest I can't get why we fix it like this.
Can you give me a clue?
dma_addr_t is not a pointer.  It's an integer type and therefore
you need to print it out as such.

Actually my patch is buggy too, on some architectures it can be
a long long so we need to cast is such.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help