[PATCH] ARM: dma-mapping: Use %zu for printing a size_t variable

Fabio Estevam festevam at gmail.com
Mon Jul 18 09:11:03 PDT 2016


On Mon, Jul 18, 2016 at 1:03 PM, Matthias Brugger
<matthias.bgg at gmail.com> wrote:

> size_t should be formated as %zu or %zx so %zx is fine here.

We are printing memory size here, so we should better print it in
decimal instead of hex.

For example: let's suppose we want to print that 256kiB allocation failed.

If we use %zu:
DMA: failed to allocate 256KiB pool for atomic coherent allocation

If we use %zx:
DMA: failed to allocate 100KiB pool for atomic coherent allocation

,which is not really what we want.



More information about the linux-arm-kernel mailing list