staging: ion: chunk_heap: use %pad for printing dma_addr_t's

We're currently using %lu and %ld to print some variables of type
dma_addr_t, which results in the following warning when dma_addr_t is
64-bits wide:

    drivers/staging/android/ion/ion_chunk_heap.c: In function 'ion_chunk_heap_create':
    drivers/staging/android/ion/ion_chunk_heap.c:176:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat=]
      pr_info("%s: base %lu size %zu align %ld\n", __func__, chunk_heap->base,
      ^
    drivers/staging/android/ion/ion_chunk_heap.c:176:2: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'dma_addr_t' [-Wformat=]

Fix this by using %pad as instructed in printk-formats.txt.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
This commit is contained in:
Mitchel Humpherys 2015-04-09 14:34:17 -07:00 committed by David Keitel
parent 01d99f383f
commit 114a9f67b6

View file

@ -173,8 +173,8 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data)
chunk_heap->heap.ops = &chunk_heap_ops;
chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK;
chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
pr_debug("%s: base %lu size %zu align %ld\n", __func__,
chunk_heap->base, heap_data->size, heap_data->align);
pr_debug("%s: base %pad size %zu align %pad\n", __func__,
&chunk_heap->base, heap_data->size, &heap_data->align);
return &chunk_heap->heap;