From c734202dc89bb3ee05a204140b3c890451e79686 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Mon, 1 Apr 2019 04:46:29 +0200 Subject: [PATCH] target/arm946e: change prototype of arm946e_verify_pointer() To prepare for handling TCL return values consistently, all calls to command_print/command_print_sameline should be ready to switch to CMD as first parameter. Change prototype of arm946e_verify_pointer() to pass CMD instead of CMD_CTX. This change was part of http://openocd.zylin.com/1815 from Paul Fertser and has been extracted and rebased to simplify the review. Change-Id: Ib7119e2b009d05eec47b50c3b9d32feaebc97538 Signed-off-by: Paul Fertser Signed-off-by: Tomas Vanek Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/5060 Tested-by: jenkins --- src/target/arm946e.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/target/arm946e.c b/src/target/arm946e.c index 073381431..278a70ca2 100644 --- a/src/target/arm946e.c +++ b/src/target/arm946e.c @@ -99,11 +99,11 @@ static int arm946e_target_create(struct target *target, Jim_Interp *interp) return ERROR_OK; } -static int arm946e_verify_pointer(struct command_context *cmd_ctx, +static int arm946e_verify_pointer(struct command_invocation *cmd, struct arm946e_common *arm946e) { if (arm946e->common_magic != ARM946E_COMMON_MAGIC) { - command_print(cmd_ctx, "target is not an ARM946"); + command_print(cmd->ctx, "target is not an ARM946"); return ERROR_TARGET_INVALID; } return ERROR_OK; @@ -558,7 +558,7 @@ COMMAND_HANDLER(arm946e_handle_cp15) struct target *target = get_current_target(CMD_CTX); struct arm946e_common *arm946e = target_to_arm946(target); - int retval = arm946e_verify_pointer(CMD_CTX, arm946e); + int retval = arm946e_verify_pointer(CMD, arm946e); if (retval != ERROR_OK) return retval; @@ -608,7 +608,7 @@ COMMAND_HANDLER(arm946e_handle_idcache) struct target *target = get_current_target(CMD_CTX); struct arm946e_common *arm946e = target_to_arm946(target); - retval = arm946e_verify_pointer(CMD_CTX, arm946e); + retval = arm946e_verify_pointer(CMD, arm946e); if (retval != ERROR_OK) return retval;