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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 15, 2019 at 10:17:37PM +0800, Zhou Wang wrote:
>
> > -	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 <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux