diff options
author | Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> | 2024-11-12 17:25:33 +0300 |
---|---|---|
committer | Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> | 2024-11-12 17:25:33 +0300 |
commit | cabb6000dfd96a72858dfd8165a5e758b9c0b14b (patch) | |
tree | 2ed1b698af4f13b72dc8178b5169c02bcef45e0c /src/rtos/hwthread.c | |
parent | f9a129271642febac27f93673fd96481aff503ca (diff) | |
parent | fd62626dff25cf503a25040d3040b0a2bb9b2a76 (diff) | |
download | riscv-openocd-cabb6000dfd96a72858dfd8165a5e758b9c0b14b.zip riscv-openocd-cabb6000dfd96a72858dfd8165a5e758b9c0b14b.tar.gz riscv-openocd-cabb6000dfd96a72858dfd8165a5e758b9c0b14b.tar.bz2 |
Merge up to fd62626dff25cf503a25040d3040b0a2bb9b2a76 from upstream
Conflicts are related to `unsigned`->`unisgned int` cleanup:
* `src/jtag/drivers/ftdi.c` -- between
6749c70a3ae891552296888986e6eeae1e17f11a and
a64dc23bf19fb4a7626fbda3c02693523ab5a75b.
* `src/rtos/hwthread.c` -- between
ef3e61bebc53f619f42bb06cfd194cd547cceb69 and
436e6f1770e4da6ec5b52724cfb637e8916b535a.
* `src/target/target.c` and `.h` -- between
53ec10b61da5de553c01f92bddf80c076bd49331 and
e72733d59025b5d595bf955b227e95e5db7305c7.
* `src/target/riscv/*` -- due to
957eb741a0980408fe4d0682fccb99a183f90998 and
fec3b224214e3784b0c00970d2421212402da880.
Resolved by:
* Changing the return type of `riscv_batch_get_dmi_read_op()` to
`uint32_t`.
* Using RISC-V OpenOCD's version in other cases.
Change-Id: Ia6e2129c6fddb1dec26adcd936506af2539412ef
Diffstat (limited to 'src/rtos/hwthread.c')
-rw-r--r-- | src/rtos/hwthread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c index e82ab6f..f5234d2 100644 --- a/src/rtos/hwthread.c +++ b/src/rtos/hwthread.c @@ -261,7 +261,7 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, int j = 0; for (int i = 0; i < reg_list_size; i++) { - if (!reg_list[i] || reg_list[i]->exist == false || reg_list[i]->hidden) + if (!reg_list[i] || !reg_list[i]->exist || reg_list[i]->hidden) continue; j++; } @@ -274,7 +274,7 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, j = 0; for (int i = 0; i < reg_list_size; i++) { - if (!reg_list[i] || reg_list[i]->exist == false || reg_list[i]->hidden) + if (!reg_list[i] || !reg_list[i]->exist || reg_list[i]->hidden) continue; if (!reg_list[i]->valid) { retval = reg_list[i]->type->get(reg_list[i]); @@ -326,7 +326,7 @@ static int hwthread_get_thread_reg_value(struct rtos *rtos, int64_t thread_id, return ERROR_FAIL; *size = reg->size; - unsigned bytes = DIV_ROUND_UP(reg->size, 8); + unsigned int bytes = DIV_ROUND_UP(reg->size, 8); *value = malloc(bytes); if (!*value) { LOG_ERROR("Failed to allocate memory for %d-bit register.", reg->size); |