From: openocd-gerrit <ope...@us...> - 2025-02-16 16:22:08
|
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 c50b54147170b70a794f39aa4850a61d3b52cb49 (commit) via ff5fb8f6100fdd630e698133f860fb02515f5cf5 (commit) from b023c4c6c51a90fb0f831c5725c44ee9061e80ab (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 c50b54147170b70a794f39aa4850a61d3b52cb49 Author: Antonio Borneo <bor...@gm...> Date: Fri Jan 10 15:17:08 2025 +0100 target: trace: drop useless typedef trace_status_t No need to use a typedef for an enum. Drop it. Change-Id: I31e0e3869c7277bcb14e05cfcac82c9655963ae6 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8704 Tested-by: jenkins Reviewed-by: zapb <de...@za...> diff --git a/src/target/etb.c b/src/target/etb.c index 3b9004bb8..fb3112d70 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -454,12 +454,12 @@ static int etb_init(struct etm_context *etm_ctx) return ERROR_OK; } -static trace_status_t etb_status(struct etm_context *etm_ctx) +static enum trace_status etb_status(struct etm_context *etm_ctx) { struct etb *etb = etm_ctx->capture_driver_priv; struct reg *control = &etb->reg_cache->reg_list[ETB_CTRL]; struct reg *status = &etb->reg_cache->reg_list[ETB_STATUS]; - trace_status_t retval = 0; + enum trace_status retval = 0; int etb_timeout = 100; etb->etm_ctx = etm_ctx; diff --git a/src/target/etm.c b/src/target/etm.c index 53d5cb68c..d9a3cdc5e 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -1567,7 +1567,7 @@ COMMAND_HANDLER(handle_etm_status_command) struct target *target; struct arm *arm; struct etm_context *etm; - trace_status_t trace_status; + enum trace_status trace_status; target = get_current_target(CMD_CTX); arm = target_to_arm(target); diff --git a/src/target/etm.h b/src/target/etm.h index 6c5b5e595..e18549dfe 100644 --- a/src/target/etm.h +++ b/src/target/etm.h @@ -126,7 +126,7 @@ struct etm_capture_driver { const char *name; const struct command_registration *commands; int (*init)(struct etm_context *etm_ctx); - trace_status_t (*status)(struct etm_context *etm_ctx); + enum trace_status (*status)(struct etm_context *etm_ctx); int (*read_trace)(struct etm_context *etm_ctx); int (*start_capture)(struct etm_context *etm_ctx); int (*stop_capture)(struct etm_context *etm_ctx); @@ -153,7 +153,7 @@ struct etm_context { struct reg_cache *reg_cache; /* ETM register cache */ struct etm_capture_driver *capture_driver; /* driver used to access ETM data */ void *capture_driver_priv; /* capture driver private data */ - trace_status_t capture_status; /* current state of capture run */ + enum trace_status capture_status; /* current state of capture run */ struct etmv1_trace_data *trace_data; /* trace data */ uint32_t trace_depth; /* number of cycles to be analyzed, 0 if no data available */ uint32_t control; /* shadow of ETM_CTRL */ diff --git a/src/target/etm_dummy.c b/src/target/etm_dummy.c index 8deccf5f9..2709b6e9d 100644 --- a/src/target/etm_dummy.c +++ b/src/target/etm_dummy.c @@ -65,7 +65,7 @@ static int etm_dummy_init(struct etm_context *etm_ctx) return ERROR_OK; } -static trace_status_t etm_dummy_status(struct etm_context *etm_ctx) +static enum trace_status etm_dummy_status(struct etm_context *etm_ctx) { return TRACE_IDLE; } diff --git a/src/target/trace.h b/src/target/trace.h index e3d787edd..dc3ab5712 100644 --- a/src/target/trace.h +++ b/src/target/trace.h @@ -33,13 +33,13 @@ struct trace { * to *hardware* tracing ... split such "real" tracing out from * the contrib/libdcc support. */ -typedef enum trace_status { +enum trace_status { TRACE_IDLE = 0x0, TRACE_RUNNING = 0x1, TRACE_TRIGGERED = 0x2, TRACE_COMPLETED = 0x4, TRACE_OVERFLOWED = 0x8, -} trace_status_t; +}; int trace_point(struct target *target, uint32_t number); int trace_register_commands(struct command_context *cmd_ctx); commit ff5fb8f6100fdd630e698133f860fb02515f5cf5 Author: Antonio Borneo <bor...@gm...> Date: Fri Jan 10 15:12:38 2025 +0100 target: etm: drop useless typedefs No need to use a typedef for an enum. Drop etmv1_pipestat_t and etmv1_branch_reason_t. Change-Id: I03ae4de3efe699d9635fc4f162649f6bedcef4c0 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8703 Reviewed-by: zapb <de...@za...> Tested-by: jenkins diff --git a/src/target/etm.h b/src/target/etm.h index be5f2c7d0..6c5b5e595 100644 --- a/src/target/etm.h +++ b/src/target/etm.h @@ -175,7 +175,7 @@ struct etm_context { }; /* PIPESTAT values */ -typedef enum { +enum etmv1_pipestat { STAT_IE = 0x0, STAT_ID = 0x1, STAT_IN = 0x2, @@ -184,10 +184,10 @@ typedef enum { STAT_BD = 0x5, STAT_TR = 0x6, STAT_TD = 0x7 -} etmv1_pipestat_t; +}; /* branch reason values */ -typedef enum { +enum etmv1_branch_reason { BR_NORMAL = 0x0, /* Normal PC change : periodic synchro (ETMv1.1) */ BR_ENABLE = 0x1, /* Trace has been enabled */ BR_RESTART = 0x2, /* Trace restarted after a FIFO overflow */ @@ -196,7 +196,7 @@ typedef enum { BR_RSVD5 = 0x5, /* reserved */ BR_RSVD6 = 0x6, /* reserved */ BR_RSVD7 = 0x7, /* reserved */ -} etmv1_branch_reason_t; +}; struct reg_cache *etm_build_reg_cache(struct target *target, struct arm_jtag *jtag_info, struct etm_context *etm_ctx); ----------------------------------------------------------------------- Summary of changes: src/target/etb.c | 4 ++-- src/target/etm.c | 2 +- src/target/etm.h | 12 ++++++------ src/target/etm_dummy.c | 2 +- src/target/trace.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- Main OpenOCD repository |