Skip to content

Commit a30951d

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
test suite: use %zu to print size_t
On 32-bit, we can't use %lu to print a size_t variable and gcc warns us about it. Shame it doesn't warn about it on 64-bit. Link: https://lkml.kernel.org/r/[email protected] Fixes: cc86e0c ("radix tree test suite: add support for slab bulk APIs") Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Liam R. Howlett <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent be8254f commit a30951d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/shared/linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
150150
void kmem_cache_free_bulk(struct kmem_cache *cachep, size_t size, void **list)
151151
{
152152
if (kmalloc_verbose)
153-
pr_debug("Bulk free %p[0-%lu]\n", list, size - 1);
153+
pr_debug("Bulk free %p[0-%zu]\n", list, size - 1);
154154

155155
pthread_mutex_lock(&cachep->lock);
156156
for (int i = 0; i < size; i++)
@@ -168,7 +168,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *cachep, gfp_t gfp, size_t size,
168168
size_t i;
169169

170170
if (kmalloc_verbose)
171-
pr_debug("Bulk alloc %lu\n", size);
171+
pr_debug("Bulk alloc %zu\n", size);
172172

173173
pthread_mutex_lock(&cachep->lock);
174174
if (cachep->nr_objs >= size) {

0 commit comments

Comments
 (0)