Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1673401
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier |
| Date | 2017-06-23 11:10 +0200 |
| Message-ID | <tVsLg-eC-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com>
Use %zx instead of %X for size_t variable offset, fixes build warning:
warning: format '%X' expects argument of type 'unsigned int', but argument
2 has type 'size_t {aka long unsigned int}' [-Wformat=]
Signed-off-by: Colin Ian King <colin.king@canonical.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 e805108afd31..c0539555fac3 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;
}
--
2.11.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier Colin King <colin.king@canonical.com> - 2017-06-23 11:10 +0200
Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier Rafał Miłecki <rafal@milecki.pl> - 2017-06-23 14:40 +0200
Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier Brian Norris <computersforpeace@gmail.com> - 2017-06-23 20:00 +0200
Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier Colin Ian King <colin.king@canonical.com> - 2017-06-23 20:10 +0200
Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier Brian Norris <computersforpeace@gmail.com> - 2017-06-23 20:20 +0200
Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier Colin Ian King <colin.king@canonical.com> - 2017-06-23 20:30 +0200
csiph-web