public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mitchel Humpherys <mitchelh@codeaurora.org>
To: Colin Cross <ccross@android.com>
Cc: devel@linuxdriverproject.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Android Kernel Team <kernel-team@android.com>,
	John Stultz <john.stultz@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: ion: chunk_heap: use %pa for printing dma_addr_t's
Date: Thu, 09 Apr 2015 16:20:13 -0700	[thread overview]
Message-ID: <vnkwy4m0hosy.fsf@mitchelh-linux1.qualcomm.com> (raw)
In-Reply-To: <CAMbhsRT=9+Lxir87j0yA2kYa8MUhCLVM6833n_d_CjjwCJAWgA@mail.gmail.com> (Colin Cross's message of "Thu, 9 Apr 2015 15:48:55 -0700")

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

      reply	other threads:[~2015-04-09 23:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 22:31 [PATCH] staging: ion: chunk_heap: use %pa for printing dma_addr_t's Mitchel Humpherys
2015-04-09 22:38 ` Greg Kroah-Hartman
2015-04-09 23:19   ` Mitchel Humpherys
2015-04-09 22:48 ` Colin Cross
2015-04-09 23:20   ` Mitchel Humpherys [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vnkwy4m0hosy.fsf@mitchelh-linux1.qualcomm.com \
    --to=mitchelh@codeaurora.org \
    --cc=ccross@android.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox