[PATCH] block: Fix the wrong format specifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>

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







[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux