diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-07-03 17:18:53 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-07-24 10:38:31 +0100 |
commit | c0c7d6fe8b04f521a7262303083ef5eb6ebaf4e5 (patch) | |
tree | ceb6cb092f7bbf31a9ca0677c6a67364d4a52ed2 /src/flash/nor/tms470.c | |
parent | 54e699b2601036e384a124657aa1fbdd9ff2dc87 (diff) | |
download | riscv-openocd-c0c7d6fe8b04f521a7262303083ef5eb6ebaf4e5.zip riscv-openocd-c0c7d6fe8b04f521a7262303083ef5eb6ebaf4e5.tar.gz riscv-openocd-c0c7d6fe8b04f521a7262303083ef5eb6ebaf4e5.tar.bz2 |
openocd: fix Yoda conditions with checkpatch
The new checkpatch can automatically fix the code, but this
feature is still error prone and not complete.
Patch generated automatically through the new checkpatch with
flags "--types CONSTANT_COMPARISON --fix-inplace".
Some Yoda condition is detected by checkpatch but not fixed; it
will be fixed manually in a following commit.
Change-Id: Ifaaa1159e63dbd1db6aa3c017125df9874fa9703
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6355
Tested-by: jenkins
Diffstat (limited to 'src/flash/nor/tms470.c')
-rw-r--r-- | src/flash/nor/tms470.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index 5078314..37f0933 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -437,7 +437,7 @@ static int tms470_try_flash_keys(struct target *target, const uint32_t *key_set) target_write_u32(target, 0xFFE89C0C, key_set[i]); } - if (ERROR_OK == tms470_check_flash_unlocked(target)) { + if (tms470_check_flash_unlocked(target) == ERROR_OK) { /* * There seems to be a side-effect of reading the FMPKEY * register in that it re-enables the protection. So we |