* [PATCH] mm, mempool: use '%zu' for printing 'size_t' variable
@ 2015-04-02 11:49 Fabio Estevam
2015-04-02 21:38 ` David Rientjes
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2015-04-02 11:49 UTC (permalink / raw)
To: akpm; +Cc: rientjes, linux-mm, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
Commit 8b65aaa9c53404 ("mm, mempool: poison elements backed by page allocator")
caused the following build warning on ARM:
mm/mempool.c:31:2: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Wformat]
Use '%zu' for printing 'size_t' variable.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
mm/mempool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mempool.c b/mm/mempool.c
index 436628d..5a2f4f0 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -28,7 +28,7 @@ static void poison_error(mempool_t *pool, void *element, size_t size,
int i;
pr_err("BUG: mempool element poison mismatch\n");
- pr_err("Mempool %p size %ld\n", pool, size);
+ pr_err("Mempool %p size %zu\n", pool, size);
pr_err(" nr=%d @ %p: %s0x", nr, element, start > 0 ? "... " : "");
for (i = start; i < end; i++)
pr_cont("%x ", *(u8 *)(element + i));
--
1.9.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm, mempool: use '%zu' for printing 'size_t' variable
2015-04-02 11:49 [PATCH] mm, mempool: use '%zu' for printing 'size_t' variable Fabio Estevam
@ 2015-04-02 21:38 ` David Rientjes
0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2015-04-02 21:38 UTC (permalink / raw)
To: Fabio Estevam; +Cc: fengguang.wu, Andrew Morton, linux-mm, Fabio Estevam
On Thu, 2 Apr 2015, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Commit 8b65aaa9c53404 ("mm, mempool: poison elements backed by page allocator")
> caused the following build warning on ARM:
>
> mm/mempool.c:31:2: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' [-Wformat]
>
> Use '%zu' for printing 'size_t' variable.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: David Rientjes <rientjes@google.com>
Fixes the mmotm:master warning reported by Fengguang on microblaze today.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-02 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02 11:49 [PATCH] mm, mempool: use '%zu' for printing 'size_t' variable Fabio Estevam
2015-04-02 21:38 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox