From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] env_onenand: fix compiler warning for error message
Date: Sun, 19 Jul 2009 17:13:45 +0200 [thread overview]
Message-ID: <20090719151345.GA17567@mail.gnudd.com> (raw)
In-Reply-To: <4A62C194.3060304@googlemail.com>
From: Alessandro Rubini <rubini@gnudd.com>
Since env_addr is a loff_t (long long), "%08lx" is not a good format;
this uses "%08llx" (not "%016llx"), to get 8 or more hex digits. I
tnknk padding to 8 digits makes things more readable for "small"
numbers, and the unlikely values over 4GB are reported correctly
anyways.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
I found this during "./MAKEALL arm", and it affects my nhk8815 as
well. The warning was already reported today by Dirk Behme, thus this is
reply to his message.
common/env_onenand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/env_onenand.c b/common/env_onenand.c
index 476fdbc..0b03537 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -101,7 +101,7 @@ int saveenv(void)
instr.addr = env_addr;
instr.mtd = mtd;
if (mtd->erase(mtd, &instr)) {
- printf("OneNAND: erase failed at 0x%08lx\n", env_addr);
+ printf("OneNAND: erase failed at 0x%08llx\n", (u64)env_addr);
return 1;
}
--
1.6.0.2
next prev parent reply other threads:[~2009-07-19 15:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-19 6:47 [U-Boot] env_onenand compiler warning Dirk Behme
2009-07-19 15:13 ` Alessandro Rubini [this message]
2009-07-19 17:17 ` [U-Boot] [PATCH] env_onenand: fix compiler warning for error message Wolfgang Denk
2009-07-20 0:53 ` [U-Boot] env_onenand compiler warning Kyungmin Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090719151345.GA17567@mail.gnudd.com \
--to=rubini-list@gnudd.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox