[PATCH] dmaengine: imx-dma: fix format warnings
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Oct 31 05:08:26 EDT 2013
On Thu, Oct 31, 2013 at 04:25:35PM +0800, Shawn Guo wrote:
> On Thu, Oct 31, 2013 at 12:40:30AM +0000, Russell King wrote:
> > drivers/dma/imx-dma.c:575:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:575:3: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:589:4: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:599:4: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:929:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:929:2: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:959:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t'
> > drivers/dma/imx-dma.c:959:2: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t'
> >
>
> We should probably mention the compiler version that we're seeing these
> warnings with. It seems that my gcc 4.6.3 does not complain about them.
This will be compiler independent. You can't pass 64-bit quantities to
printf with "%x". The reason you're not seeing them is because your
normal builds will have dma_addr_t as 32-bit, but if LPAE is enabled
(which can happen with randconfig), dma_addr_t can also be 64-bit.
This is why Olof's build results regularly pop this up.
As I will be expanding my builds to include things like LPAE and KVM,
I will start seeing these warnings as well.
More information about the linux-arm-kernel
mailing list