From: Mitchel Humpherys <mitchelh@codeaurora.org>
To: devel@linuxdriverproject.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Android Kernel Team <kernel-team@android.com>,
Colin Cross <ccross@android.com>,
John Stultz <john.stultz@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Mitchel Humpherys <mitchelh@codeaurora.org>
Subject: [PATCH v2 2/2] staging: ion: chunk_heap: use %pad for printing dma_addr_t's
Date: Thu, 9 Apr 2015 18:10:04 -0700 [thread overview]
Message-ID: <1428628204-25752-2-git-send-email-mitchelh@codeaurora.org> (raw)
In-Reply-To: <1428628204-25752-1-git-send-email-mitchelh@codeaurora.org>
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>
---
drivers/staging/android/ion/ion_chunk_heap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c
index 54746157d799..6b3e18aa1c64 100644
--- a/drivers/staging/android/ion/ion_chunk_heap.c
+++ b/drivers/staging/android/ion/ion_chunk_heap.c
@@ -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;
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-04-10 1:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 1:10 [PATCH v2 1/2] staging: ion: chunk_heap: use pr_debug for heap creation print Mitchel Humpherys
2015-04-10 1:10 ` Mitchel Humpherys [this message]
2015-05-04 8:22 ` [PATCH v2 2/2] staging: ion: chunk_heap: use %pad for printing dma_addr_t's Dan Carpenter
2015-05-04 20:05 ` Colin Cross
2015-05-05 5:59 ` Mitchel Humpherys
2015-05-08 7:26 ` Greg Kroah-Hartman
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=1428628204-25752-2-git-send-email-mitchelh@codeaurora.org \
--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