mm, mempool: use '%zu' for printing 'size_t' variable
Subsystems (2)
PATCH 1/1 mm, mempool: use '%zu' for printing 'size_t' variable
From: Fabio Estevam <[email protected]>
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.
--- mm/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mempool.c +1 -1
@@ -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));
Signature · 7 lines
1.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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 <[email protected]>
Fixes the mmotm:master warning reported by Fengguang on microblaze today.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>