NOR/CFI: fix order of arguments check
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 14 Apr 2010 08:32:30 +0000 (16:32 +0800)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 15 Apr 2010 17:19:46 +0000 (19:19 +0200)
Syntax of "flash bank" command requires:
- chip_width as CMD_ARGV[3]
- bus_width  as CMD_ARGV[4]
Actual code swaps the arguments.
Bug has no run time impact since wrong variables
are only used to check value and both are checked
against same constraint.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
src/flash/nor/cfi.c

index 4dad7b6fe8d210701683bf13cb9dca7ca3256a18..325dce905e98440526d95160d4322b1b0de4c70f 100644 (file)
@@ -599,8 +599,8 @@ FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command)
        }
 
        uint16_t chip_width, bus_width;
-       COMMAND_PARSE_NUMBER(u16, CMD_ARGV[3], bus_width);
-       COMMAND_PARSE_NUMBER(u16, CMD_ARGV[4], chip_width);
+       COMMAND_PARSE_NUMBER(u16, CMD_ARGV[3], chip_width);
+       COMMAND_PARSE_NUMBER(u16, CMD_ARGV[4], bus_width);
 
        if ((chip_width > CFI_MAX_CHIP_WIDTH)
                        || (bus_width > CFI_MAX_BUS_WIDTH))

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)