From 8f45ae2d95a768441fc036cd1e49004c332f8bb3 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 6 Apr 2017 14:21:31 +0200 Subject: [PATCH] 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 Original-Commit-Id: 878c2de41b17443c8b358c4a3171669d8aab5ccd Original-Change-Id: I390996b253f2f20682cd9ab2d4f560de6eccfc57 Original-Signed-off-by: Arthur Heymans Original-Reviewed-on: https://review.coreboot.org/19152 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Paul Menzel Original-Reviewed-by: Alexander Couzens Reviewed-on: https://chromium-review.googlesource.com/488052 --- util/ectool/ectool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/ectool/ectool.c b/util/ectool/ectool.c index 6d9668ded2..dcf17288f1 100644 --- a/util/ectool/ectool.c +++ b/util/ectool/ectool.c @@ -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");