Skip to content

Commit 4530026

Browse files
Matthew Wilcox (Oracle)gregkh
authored andcommitted
test suite: use %zu to print size_t
[ Upstream commit a30951d ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 86d5243 commit 4530026

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
@@ -147,7 +147,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
147147
void kmem_cache_free_bulk(struct kmem_cache *cachep, size_t size, void **list)
148148
{
149149
if (kmalloc_verbose)
150-
pr_debug("Bulk free %p[0-%lu]\n", list, size - 1);
150+
pr_debug("Bulk free %p[0-%zu]\n", list, size - 1);
151151

152152
pthread_mutex_lock(&cachep->lock);
153153
for (int i = 0; i < size; i++)
@@ -165,7 +165,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *cachep, gfp_t gfp, size_t size,
165165
size_t i;
166166

167167
if (kmalloc_verbose)
168-
pr_debug("Bulk alloc %lu\n", size);
168+
pr_debug("Bulk alloc %zu\n", size);
169169

170170
pthread_mutex_lock(&cachep->lock);
171171
if (cachep->nr_objs >= size) {

0 commit comments

Comments
 (0)