From: Paul Fertser Date: Mon, 1 Apr 2019 02:37:05 +0000 (+0200) Subject: target/arm966e: change prototype of arm966e_verify_pointer() X-Git-Tag: v0.11.0-rc1~705 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=6a453e5cf0adc4d19378e953122ca69efcf32b6d target/arm966e: change prototype of arm966e_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 arm966e_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: I92745591256ad56a588b6386842028e0b18dec96 Signed-off-by: Paul Fertser Signed-off-by: Tomas Vanek Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/5058 Tested-by: jenkins --- diff --git a/src/target/arm966e.c b/src/target/arm966e.c index c9d7f01aa4..98c62745f2 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -56,11 +56,11 @@ static int arm966e_target_create(struct target *target, Jim_Interp *interp) return arm966e_init_arch_info(target, arm966e, target->tap); } -static int arm966e_verify_pointer(struct command_context *cmd_ctx, +static int arm966e_verify_pointer(struct command_invocation *cmd, struct arm966e_common *arm966e) { if (arm966e->common_magic != ARM966E_COMMON_MAGIC) { - command_print(cmd_ctx, "target is not an ARM966"); + command_print(cmd->ctx, "target is not an ARM966"); return ERROR_TARGET_INVALID; } return ERROR_OK; @@ -170,7 +170,7 @@ COMMAND_HANDLER(arm966e_handle_cp15_command) struct target *target = get_current_target(CMD_CTX); struct arm966e_common *arm966e = target_to_arm966(target); - retval = arm966e_verify_pointer(CMD_CTX, arm966e); + retval = arm966e_verify_pointer(CMD, arm966e); if (retval != ERROR_OK) return retval;