[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241204144502.7960-1-liujing@cmss.chinamobile.com>
Date: Wed, 4 Dec 2024 22:45:02 +0800
From: liujing <liujing@...s.chinamobile.com>
To: axboe@...nel.dk
Cc: linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org,
liujing <liujing@...s.chinamobile.com>
Subject: [PATCH] block: Fix the wrong format specifier
Make a minor change to eliminate a static checker warning. The type
of 'size' is unsigned int, so the correct format specifier should be
%u instead of %d.
Signed-off-by: liujing <liujing@...s.chinamobile.com>
diff --git a/block/bio.c b/block/bio.c
index ac4d77c88932..3a75de450799 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -89,7 +89,7 @@ static struct bio_slab *create_bio_slab(unsigned int size)
if (!bslab)
return NULL;
- snprintf(bslab->name, sizeof(bslab->name), "bio-%d", size);
+ snprintf(bslab->name, sizeof(bslab->name), "bio-%u", size);
bslab->slab = kmem_cache_create(bslab->name, size,
ARCH_KMALLOC_MINALIGN,
SLAB_HWCACHE_ALIGN | SLAB_TYPESAFE_BY_RCU, NULL);
--
2.27.0
Powered by blists - more mailing lists