From: Artem Bityutskiy <dedekind1@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Kevin Cernekee <cernekee@gmail.com>,
linux-mtd@lists.infradead.org,
Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: [PATCH] mtd-utils: flash_erase: Fix output of offsets
Date: Sun, 17 Oct 2010 11:04:15 +0300 [thread overview]
Message-ID: <1287302655.1951.3.camel@localhost> (raw)
In-Reply-To: <1287262445-19654-1-git-send-email-computersforpeace@gmail.com>
On Sat, 2010-10-16 at 13:54 -0700, Brian Norris wrote:
> Need to use unsigned arithmetic and a 64-bit cast in order to
> calculate and output the correct offset for eraseblocks at large
> offsets. Signed integer arithmetic does not produce the correct
> result "uint64_t" result, so for offsets over 2GB we get
> messages like:
>
> Erasing 512 Kibyte @ ffffffff83180000 -- 4308642136 % complete.
>
> Note that this error was not affecting proper erasure; it just
> produced incorrect status messages.
>
> Also, we should not add an extra eraseblock for the final status
> message; this gives misleading output when, for example, the
> following statement is executed:
>
> $ flash_erase /dev/mtd0 0 1
> Erasing 512 Kibyte @ 80000 -- 100 % complete
>
> We aren't erasing at offset 0x80000; it should display offset 0.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Pushed, thanks!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2010-10-17 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-16 20:54 [PATCH] mtd-utils: flash_erase: Fix output of offsets Brian Norris
2010-10-16 21:24 ` Mike Frysinger
2010-10-17 8:04 ` Artem Bityutskiy [this message]
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=1287302655.1951.3.camel@localhost \
--to=dedekind1@gmail.com \
--cc=cernekee@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).