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:
@@ -1252,7 +1252,7 @@ int arm_get_gdb_reg_list(struct target *target,
|
||||
/* wait for execution to complete and check exit point */
|
||||
static int armv4_5_run_algorithm_completion(struct target *target,
|
||||
uint32_t exit_point,
|
||||
int timeout_ms,
|
||||
unsigned int timeout_ms,
|
||||
void *arch_info)
|
||||
{
|
||||
int retval;
|
||||
@@ -1286,9 +1286,9 @@ int armv4_5_run_algorithm_inner(struct target *target,
|
||||
int num_mem_params, struct mem_param *mem_params,
|
||||
int num_reg_params, struct reg_param *reg_params,
|
||||
uint32_t entry_point, uint32_t exit_point,
|
||||
int timeout_ms, void *arch_info,
|
||||
unsigned int timeout_ms, void *arch_info,
|
||||
int (*run_it)(struct target *target, uint32_t exit_point,
|
||||
int timeout_ms, void *arch_info))
|
||||
unsigned int timeout_ms, void *arch_info))
|
||||
{
|
||||
struct arm *arm = target_to_arm(target);
|
||||
struct arm_algorithm *arm_algorithm_info = arch_info;
|
||||
@@ -1474,7 +1474,7 @@ int armv4_5_run_algorithm(struct target *target,
|
||||
struct reg_param *reg_params,
|
||||
target_addr_t entry_point,
|
||||
target_addr_t exit_point,
|
||||
int timeout_ms,
|
||||
unsigned int timeout_ms,
|
||||
void *arch_info)
|
||||
{
|
||||
return armv4_5_run_algorithm_inner(target,
|
||||
@@ -1535,7 +1535,7 @@ int arm_checksum_memory(struct target *target,
|
||||
buf_set_u32(reg_params[1].value, 0, 32, count);
|
||||
|
||||
/* 20 second timeout/megabyte */
|
||||
int timeout = 20000 * (1 + (count / (1024 * 1024)));
|
||||
unsigned int timeout = 20000 * (1 + (count / (1024 * 1024)));
|
||||
|
||||
/* armv4 must exit using a hardware breakpoint */
|
||||
if (arm->arch == ARM_ARCH_V4)
|
||||
|
||||
Reference in New Issue
Block a user