|
From: openocd-gerrit <ope...@us...> - 2026-07-28 14:52:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 4b97bf85807ad5242b14a87fcd2bc77b7b0624f0 (commit)
from 43441cd83b229c106ab505cda047da116d454023 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4b97bf85807ad5242b14a87fcd2bc77b7b0624f0
Author: Zane Leung <zhe...@sp...>
Date: Fri Jul 24 15:43:33 2026 +0800
target/riscv: drop type 'target_list_t'
Replace the type 'target_list_t' with struct 'target_list'.
Change-Id: I13bbd38d49fcc756bfde1ccf492cf0b6de75fc87
Signed-off-by: Zane Leung <zhe...@sp...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9798
Reviewed-by: Evgeniy Naydanov <eu...@gm...>
Reviewed-by: Tomas Vanek <va...@fb...>
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index b4664d2a7..34df26696 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -139,11 +139,6 @@ typedef struct {
bool abstract_cmd_maybe_busy;
} dm013_info_t;
-typedef struct {
- struct list_head list;
- struct target *target;
-} target_list_t;
-
struct ac_cache {
uint32_t *commands;
size_t size;
@@ -309,8 +304,8 @@ static dm013_info_t *get_dm(struct target *target)
}
info->dm = dm;
- target_list_t *target_entry;
- list_for_each_entry(target_entry, &dm->target_list, list) {
+ struct target_list *target_entry;
+ list_for_each_entry(target_entry, &dm->target_list, lh) {
if (target_entry->target == target)
return dm;
}
@@ -320,7 +315,7 @@ static dm013_info_t *get_dm(struct target *target)
return NULL;
}
target_entry->target = target;
- list_add(&target_entry->list, &dm->target_list);
+ list_add(&target_entry->lh, &dm->target_list);
return dm;
}
@@ -332,10 +327,10 @@ static void riscv013_dm_free(struct target *target)
if (!dm)
return;
- target_list_t *target_entry;
- list_for_each_entry(target_entry, &dm->target_list, list) {
+ struct target_list *target_entry;
+ list_for_each_entry(target_entry, &dm->target_list, lh) {
if (target_entry->target == target) {
- list_del(&target_entry->list);
+ list_del(&target_entry->lh);
free(target_entry);
break;
}
@@ -2245,8 +2240,8 @@ static int riscv013_authdata_write(struct target *target, uint32_t value, unsign
dm013_info_t *dm = get_dm(target);
if (!dm)
return ERROR_FAIL;
- target_list_t *entry;
- list_for_each_entry(entry, &dm->target_list, list) {
+ struct target_list *entry;
+ list_for_each_entry(entry, &dm->target_list, lh) {
if (target_examine_one(entry->target) != ERROR_OK)
result = ERROR_FAIL;
}
@@ -5221,10 +5216,10 @@ static int select_prepped_harts(struct target *target)
if (!hawindow)
return ERROR_FAIL;
- target_list_t *entry;
+ struct target_list *entry;
unsigned int total_selected = 0;
unsigned int selected_index = 0;
- list_for_each_entry(entry, &dm->target_list, list) {
+ list_for_each_entry(entry, &dm->target_list, lh) {
struct target *t = entry->target;
struct riscv_info *info = riscv_info(t);
riscv013_info_t *info_013 = get_info(t);
@@ -5319,8 +5314,8 @@ static int riscv013_halt_go(struct target *target)
dm_write(target, DM_DMCONTROL, dmcontrol);
if (dm->current_hartid == HART_INDEX_MULTIPLE) {
- target_list_t *entry;
- list_for_each_entry(entry, &dm->target_list, list) {
+ struct target_list *entry;
+ list_for_each_entry(entry, &dm->target_list, lh) {
struct target *t = entry->target;
uint32_t t_dmstatus;
if (get_field(dmstatus, DM_DMSTATUS_ALLHALTED) ||
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv-013.c | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|