diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-12-17 13:43:17 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-12-19 00:12:28 +0000 |
commit | 6ab8e91658f1efc894b648cc0748af8d804915e4 (patch) | |
tree | c33da7914793452ecb37084e505230171d4eff9e /util/stm32mon.c | |
parent | e5935f17d1798a1f19c6003e57f140446774484f (diff) | |
download | chrome-ec-6ab8e91658f1efc894b648cc0748af8d804915e4.tar.gz |
cleanup: Remove checkpatch warnings
This make minor syntactic changes and renames some camel-cased symbols
to keep checkpatch from complaining. The goal is to reduce the
temptation to use 'repo upload --no-verify'.
This is a big furball of find/replace, but no functional changes.
BUG=chromium:322144
BRANCH=none
TEST=build all boards; pass unit tests
Change-Id: I0269b7dd95836ef9a6e33f88c003ab0f24f842a0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/180495
Diffstat (limited to 'util/stm32mon.c')
-rw-r--r-- | util/stm32mon.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/util/stm32mon.c b/util/stm32mon.c index 2c347dc908..e018e4898c 100644 --- a/util/stm32mon.c +++ b/util/stm32mon.c @@ -225,11 +225,11 @@ int send_command(int fd, uint8_t cmd, payload_t *loads, int cnt, } /* Send the command payloads */ - for (p = loads, c = 0; c < cnt ; c++, p++) { + for (p = loads, c = 0; c < cnt; c++, p++) { crc = 0; size = p->size; data = p->data; - for (i = 0; i < size ; i++) + for (i = 0; i < size; i++) crc ^= data[i]; if (size == 1) crc = 0xff ^ crc; @@ -291,7 +291,7 @@ struct stm32_def *command_get_id(int fd) return NULL; } chipid = (id[1] << 8) | id[2]; - for (def = chip_defs ; def->id ; def++) + for (def = chip_defs; def->id; def++) if (def->id == chipid) break; if (def->id == 0) @@ -625,7 +625,8 @@ int write_flash(int fd, struct stm32_def *chip, const char *filename, free(buffer); return -EIO; } - if ((res = fread(buffer, 1, size, hnd)) <= 0) { + res = fread(buffer, 1, size, hnd); + if (res <= 0) { fprintf(stderr, "Cannot read %s\n", filename); free(buffer); return -EIO; |