From 3507bfe10d62df350c643656cc676a342eb4bf8f Mon Sep 17 00:00:00 2001 From: stefanct Date: Sat, 27 Oct 2012 15:36:56 +0000 Subject: Do not read the flash chip twice in verification mode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kyösti Mälkki noticed that we unnecessarily read the flash chip twice when called with --verify. The first one is the mandatory read before everything (to be able to detect the seriousness of errors), but the second one is not necessary because we can just use the former for the comparison. This introduces a small output change: previously we printed ERASE or VERIFY depending on the callee. This special case has been dropped because it is unnecessary to print it (and wrong for the verification function to need to know why it is verifying exactly). If an erase fails we mention that fact explicitly already, similar for verify. Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1619 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- jedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jedec.c') diff --git a/jedec.c b/jedec.c index d8532c6..7bc9133 100644 --- a/jedec.c +++ b/jedec.c @@ -410,7 +410,7 @@ retry: dst = d; src = s; - failed = verify_range(flash, src, start, page_size, NULL); + failed = verify_range(flash, src, start, page_size); if (failed && tried++ < MAX_REFLASH_TRIES) { msg_cerr("retrying.\n"); -- cgit v1.2.1