target: use unsigned int for timeout_ms
Change the prototype of functions: - target_run_algorithm() - target_wait_algorithm() - target_wait_state() - struct target_type::run_algorithm() - struct target_type::wait_algorithm() to use unsigned int for timeout_ms instead of int. Change accordingly the variables passed as parameter. Change-Id: I0b8d6e691bb3c749eeb2911dc5a86c38cc0cb65d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7562 Tested-by: jenkins
This commit is contained in:
@@ -809,7 +809,7 @@ int target_run_algorithm(struct target *target,
|
||||
int num_mem_params, struct mem_param *mem_params,
|
||||
int num_reg_params, struct reg_param *reg_param,
|
||||
target_addr_t entry_point, target_addr_t exit_point,
|
||||
int timeout_ms, void *arch_info)
|
||||
unsigned int timeout_ms, void *arch_info)
|
||||
{
|
||||
int retval = ERROR_FAIL;
|
||||
|
||||
@@ -893,7 +893,7 @@ done:
|
||||
int target_wait_algorithm(struct target *target,
|
||||
int num_mem_params, struct mem_param *mem_params,
|
||||
int num_reg_params, struct reg_param *reg_params,
|
||||
target_addr_t exit_point, int timeout_ms,
|
||||
target_addr_t exit_point, unsigned int timeout_ms,
|
||||
void *arch_info)
|
||||
{
|
||||
int retval = ERROR_FAIL;
|
||||
@@ -3229,7 +3229,7 @@ COMMAND_HANDLER(handle_wait_halt_command)
|
||||
*
|
||||
* After 500ms, keep_alive() is invoked
|
||||
*/
|
||||
int target_wait_state(struct target *target, enum target_state state, int ms)
|
||||
int target_wait_state(struct target *target, enum target_state state, unsigned int ms)
|
||||
{
|
||||
int retval;
|
||||
int64_t then = 0, cur;
|
||||
@@ -5785,8 +5785,8 @@ COMMAND_HANDLER(handle_target_wait_state)
|
||||
return ERROR_COMMAND_ARGUMENT_INVALID;
|
||||
}
|
||||
|
||||
int a;
|
||||
COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], a);
|
||||
unsigned int a;
|
||||
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[1], a);
|
||||
|
||||
struct target *target = get_current_target(CMD_CTX);
|
||||
if (!target->tap->enabled) {
|
||||
|
||||
Reference in New Issue
Block a user