Skip to contentSkip to conversation

mmc: block: fix format string warning

PATCH Applied Asaf Vertz 2 participants 2 messages Jan 20, 2015 – Jan 21, 2015 MMC, SD and SDIO

lore
Share & tools
lore

Asaf Vertz

author
#0 lore raw

PATCH 1/1 mmc: block: fix format string warning

Fixed the following warning (reported by cppcheck):
[drivers/mmc/card/block.c:2149]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.

---
 drivers/mmc/card/block.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/card/block.c +1 -1
index 4409d79..8e1a60e 100644
@@ -2147,7 +2147,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
 	 */
 
 	snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
-		 "mmcblk%d%s", md->name_idx, subname ? subname : "");
+		 "mmcblk%u%s", md->name_idx, subname ? subname : "");
 
 	if (mmc_card_mmc(card))
 		blk_queue_logical_block_size(md->queue.queue,
Signature · 1 line
1.7.0.4
Applied
#1 lore raw
Quoted 5 lines · Asaf Vertz

Fixed the following warning (reported by cppcheck):
[drivers/mmc/card/block.c:2149]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.

Thanks! Applied for next.

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/card/block.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/card/block.c +1 -2
index 4409d79..8e1a60e 100644
@@ -2147,7 +2147,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
         */
 
        snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
-                "mmcblk%d%s", md->name_idx, subname ? subname : "");
+                "mmcblk%u%s", md->name_idx, subname ? subname : "");
 
        if (mmc_card_mmc(card))
                blk_queue_logical_block_size(md->queue.queue,
--

1.7.0.4