From: Øyvind H. <go...@us...> - 2010-04-15 19:22:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b886049c74de147b1ce6f7f0173ecd71323c5c64 (commit) via c9e58238c3b1ae181a7d54bc5255ef98771493c2 (commit) from ee139164114460d5c4c1a720e28740a7dceca712 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b886049c74de147b1ce6f7f0173ecd71323c5c64 Author: Antonio Borneo <bor...@gm...> Date: Wed Apr 14 16:51:16 2010 +0800 NOR/CFI: remove redundant code Arguments for "flash bank" command are already parsed and put in "bank" struct. Removed code to parse them again. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 325dce9..a64d78f 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -598,12 +598,8 @@ FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command) return ERROR_FLASH_BANK_INVALID; } - uint16_t chip_width, bus_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)) + if ((bank->chip_width > CFI_MAX_CHIP_WIDTH) + || (bank->bus_width > CFI_MAX_BUS_WIDTH)) { LOG_ERROR("chip and bus width have to specified in bytes"); return ERROR_FLASH_BANK_INVALID; commit c9e58238c3b1ae181a7d54bc5255ef98771493c2 Author: Antonio Borneo <bor...@gm...> Date: Wed Apr 14 16:32:30 2010 +0800 NOR/CFI: fix order of arguments check 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 <bor...@gm...> diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 4dad7b6..325dce9 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -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)) ----------------------------------------------------------------------- Summary of changes: src/flash/nor/cfi.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |