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.

Change-Id: I390996b253f2f20682cd9ab2d4f560de6eccfc57
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19152
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
Arthur Heymans 2017-04-06 14:21:31 +02:00 committed by Martin Roth
parent 2873a4aea4
commit 878c2de41b
1 changed files with 1 additions and 2 deletions

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");