From: OpenOCD-Gerrit <ope...@us...> - 2021-06-26 13:41:37
|
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 873e5c3976eb82589d5a645266b6ae75cb4c2ecf (commit) via 56b72b33cfc7014e001fa9e209b62f4b6c009fb5 (commit) from fb34fd60ca955fe05c31357052aefad5fa1ef08f (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 873e5c3976eb82589d5a645266b6ae75cb4c2ecf Author: Marc Schink <de...@za...> Date: Thu Jun 17 15:50:47 2021 +0200 target/dsp563xx: Use bool data type for 'hardware_breakpoints_cleared' Change-Id: Ic18973d3e90d74c211b48627bdaac4cf3357b682 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6324 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c index 730573347..5ad52b58d 100644 --- a/src/target/dsp563xx.c +++ b/src/target/dsp563xx.c @@ -913,7 +913,7 @@ static int dsp563xx_init_target(struct command_context *cmd_ctx, struct target * dsp563xx_build_reg_cache(target); struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target); - dsp563xx->hardware_breakpoints_cleared = 0; + dsp563xx->hardware_breakpoints_cleared = false; dsp563xx->hardware_breakpoint[0].used = BPU_NONE; return ERROR_OK; @@ -1096,7 +1096,7 @@ static int dsp563xx_poll(struct target *target) if (err != ERROR_OK) return err; - dsp563xx->hardware_breakpoints_cleared = 1; + dsp563xx->hardware_breakpoints_cleared = true; } return ERROR_OK; diff --git a/src/target/dsp563xx.h b/src/target/dsp563xx.h index 18428b854..5c3e1d3c7 100644 --- a/src/target/dsp563xx.h +++ b/src/target/dsp563xx.h @@ -52,7 +52,7 @@ struct dsp563xx_common { struct hardware_breakpoint hardware_breakpoint[1]; /*Were the hardware breakpoints cleared on startup?*/ - int hardware_breakpoints_cleared; + bool hardware_breakpoints_cleared; }; struct dsp563xx_core_reg { commit 56b72b33cfc7014e001fa9e209b62f4b6c009fb5 Author: Marc Schink <de...@za...> Date: Thu Jun 17 15:47:11 2021 +0200 target/dsp563xx: Handle return values This fixes 'dead assignment' bugs identified by the clang static analyzer. Change-Id: I140ed55f0043e06a533f45f50a36887614585b04 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6323 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c index 81ea21e81..730573347 100644 --- a/src/target/dsp563xx.c +++ b/src/target/dsp563xx.c @@ -1085,8 +1085,17 @@ static int dsp563xx_poll(struct target *target) if (!dsp563xx->hardware_breakpoints_cleared) { err = dsp563xx_once_reg_write(target->tap, 1, DSP563XX_ONCE_OBCR, 0); + if (err != ERROR_OK) + return err; + err = dsp563xx_once_reg_write(target->tap, 1, DSP563XX_ONCE_OMLR0, 0); + if (err != ERROR_OK) + return err; + err = dsp563xx_once_reg_write(target->tap, 1, DSP563XX_ONCE_OMLR1, 0); + if (err != ERROR_OK) + return err; + dsp563xx->hardware_breakpoints_cleared = 1; } ----------------------------------------------------------------------- Summary of changes: src/target/dsp563xx.c | 13 +++++++++++-- src/target/dsp563xx.h | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |