From: Øyvind H. <go...@us...> - 2010-06-21 15:03:31
|
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 2fbb0b5972b04e10090e39137817e9f359fb6105 (commit) via dcba0709580cd8b0d2869894d2f7e22195b7e3d7 (commit) from 7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a (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 2fbb0b5972b04e10090e39137817e9f359fb6105 Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Jun 21 13:32:16 2010 +0200 jtag: retire jtag_get_error() This fn is an implementation detail of jtag_execute_queue() that is not to be exposed externally. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/jtag/core.c b/src/jtag/core.c index 65ca824..782f10f 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -52,9 +52,9 @@ static void jtag_add_scan_check(struct jtag_tap *active, * when an error occurs during processing that should be reported during * jtag_execute_queue(). * - * Tts value may be checked with jtag_get_error() and cleared with - * jtag_error_clear(). This value is returned (and cleared) by - * jtag_execute_queue(). + * The value is set and cleared, but never read by normal application code. + * + * This value is returned (and cleared) by jtag_execute_queue(). */ static int jtag_error = ERROR_OK; @@ -131,10 +131,7 @@ void jtag_set_error(int error) return; jtag_error = error; } -int jtag_get_error(void) -{ - return jtag_error; -} + int jtag_error_clear(void) { int temp = jtag_error; diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index cdc02ab..97ceb01 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -661,8 +661,6 @@ void jtag_sleep(uint32_t us); * called with a non-zero error code. */ void jtag_set_error(int error); -/// @returns The current value of jtag_error -int jtag_get_error(void); /** * Resets jtag_error to ERROR_OK, returning its previous value. * @returns The previous value of @c jtag_error. commit dcba0709580cd8b0d2869894d2f7e22195b7e3d7 Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Jun 21 13:25:06 2010 +0200 jtag: do not use jtag_get_error() normal code should not call jtag_get_error(), but rather check the return code from jtag_execute_queue(). Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 44f624f..0a374be 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -120,7 +120,7 @@ int adi_jtag_dp_scan(struct adiv5_dap *dap, jtag_add_runtest(dap->memaccess_tck, TAP_IDLE); - return jtag_get_error(); + return ERROR_OK; } /** @@ -343,14 +343,11 @@ static int jtag_idcode_q_read(struct adiv5_dap *dap, fields[0].in_value = (void *) data; jtag_add_dr_scan(jtag_info->tap, 1, fields, TAP_IDLE); - retval = jtag_get_error(); - if (retval != ERROR_OK) - return retval; jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t) data); - return retval; + return ERROR_OK; } static int jtag_dp_q_read(struct adiv5_dap *dap, unsigned reg, diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index 51d0e7b..f4d09ff 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -331,7 +331,7 @@ COMMAND_HANDLER(handle_xsvf_command) else jtag_add_pathmove(pathlen, path); - result = jtag_get_error(); + result = jtag_execute_queue(); if (result != ERROR_OK) { LOG_ERROR("XSVF: pathmove error %d", result); ----------------------------------------------------------------------- Summary of changes: src/jtag/core.c | 11 ++++------- src/jtag/jtag.h | 2 -- src/target/adi_v5_jtag.c | 7 ++----- src/xsvf/xsvf.c | 2 +- 4 files changed, 7 insertions(+), 15 deletions(-) hooks/post-receive -- Main OpenOCD repository |