UPSTREAM: util/ectool: Dump ram by default

According to the comment above the default should dump the EC ram,
though is never reached since the variable 'write_addr' is not 0, but
initialized at -1.

Also removes brackets around one line statement below if to make
checkpatch.pl happy.

BUG=none
BRANCH=none
TEST=none

Change-Id: I6e055b5ad1c2bbd62ac450a9c38267fd92fc884e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 878c2de41b
Original-Change-Id: I390996b253f2f20682cd9ab2d4f560de6eccfc57
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19152
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://chromium-review.googlesource.com/488052
This commit is contained in:
Arthur Heymans 2017-04-06 14:21:31 +02:00 committed by chrome-bot
commit 8f45ae2d95

View file

@ -135,9 +135,8 @@ int main(int argc, char *argv[])
}
/* preserve default - dump_ram if nothing selected */
if (!dump_ram && !dump_idx && !dump_query && !write_addr) {
if (!dump_ram && !dump_idx && !dump_query && (write_addr == -1))
dump_ram = 1;
}
if (dump_ram) {
printf("EC RAM:\n");