mtd: parsers: trx: fix pr_err format for printing offset

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jul 13 10:59:06 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=58de51ca77e2166262b043b0ff93290b184a2364
Commit:     58de51ca77e2166262b043b0ff93290b184a2364
Parent:     6eab81e6358730fd566e2c069d7be2309713ac3a
Author:     Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Fri Jun 23 07:07:14 2017 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Jun 23 10:47:54 2017 -0700

    mtd: parsers: trx: fix pr_err format for printing offset
    
    This fixes following warning:
    include/linux/kern_levels.h:4:18: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/parsers/parser_trx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/parsers/parser_trx.c b/drivers/mtd/parsers/parser_trx.c
index e805108..df360a7 100644
--- a/drivers/mtd/parsers/parser_trx.c
+++ b/drivers/mtd/parsers/parser_trx.c
@@ -39,7 +39,7 @@ static const char *parser_trx_data_part_name(struct mtd_info *master,
 	err  = mtd_read(master, offset, sizeof(buf), &bytes_read,
 			(uint8_t *)&buf);
 	if (err && !mtd_is_bitflip(err)) {
-		pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
+		pr_err("mtd_read error while parsing (offset: 0x%zX): %d\n",
 			offset, err);
 		goto out_default;
 	}



More information about the linux-mtd-cvs mailing list