lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] staging: ion: chunk_heap: use %pa for printing dma_addr_t's
Date
On Thu, Apr 09 2015 at 03:48:55 PM, Colin Cross <ccross@android.com> wrote:
> On Thu, Apr 9, 2015 at 3:31 PM, Mitchel Humpherys
> <mitchelh@codeaurora.org> wrote:
>> 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 %pa as instructed in printk-formats.txt.
>
> According to printk-formats.txt, dma_addr_t needs to be printed with %pad.

Ah good catch. I'll send a v2.

I need to check printk-formats.txt more often... :)


-Mitch

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


\
 
 \ /
  Last update: 2015-04-10 02:01    [W:0.045 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site