From 2f3ab89a78d217f20233fab0f514b241908c9ce8 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Mon, 1 Apr 2019 04:44:43 +0200 Subject: [PATCH] target/arm720t: change prototype of arm720t_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 arm720t_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: I7fa0628fabacd9ceb62ce921192f88edca659c15 Signed-off-by: Paul Fertser Signed-off-by: Tomas Vanek Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/5059 Tested-by: jenkins --- src/target/arm720t.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/target/arm720t.c b/src/target/arm720t.c index b592ffc47..e8ad852c9 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -233,11 +233,11 @@ static void arm720t_pre_restore_context(struct target *target) arm720t_write_cp15(target, 0xee060f10, arm720t->far_reg); } -static int arm720t_verify_pointer(struct command_context *cmd_ctx, +static int arm720t_verify_pointer(struct command_invocation *cmd, struct arm720t_common *arm720t) { if (arm720t->common_magic != ARM720T_COMMON_MAGIC) { - command_print(cmd_ctx, "target is not an ARM720"); + command_print(cmd->ctx, "target is not an ARM720"); return ERROR_TARGET_INVALID; } return ERROR_OK; @@ -442,7 +442,7 @@ COMMAND_HANDLER(arm720t_handle_cp15_command) struct target *target = get_current_target(CMD_CTX); struct arm720t_common *arm720t = target_to_arm720(target); - retval = arm720t_verify_pointer(CMD_CTX, arm720t); + retval = arm720t_verify_pointer(CMD, arm720t); if (retval != ERROR_OK) return retval;