|
From: openocd-gerrit <ope...@us...> - 2024-03-10 17:55:20
|
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 12ff36bd19e4f25dd7505c46a77d9f2c47dc350a (commit)
from 561ea48d83ae4b83ff823888a80cbcc282b61333 (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 12ff36bd19e4f25dd7505c46a77d9f2c47dc350a
Author: Tomas Vanek <va...@fb...>
Date: Sun Mar 10 12:12:55 2024 +0100
flash/nor/nrf5: drop useless for cycle condition
Commit [1] added a break on error to the nrf5_erase() sector loop
and the checking of the res value became useless in the for loop condition.
Removing nrf5_get_probed_chip_if_halted() later in [2]
dropped res initialization and clang static analyser complains
"The left operand of '==' is a garbage value"
Drop the useless test!
Fixes: [1] commit 491636c8b832 ("flash/nor/nrf5: check protection before flash erase/write on nRF51")
Fixes: [2] commit 2db325f5395f ("flash/nor/nrf5: drop nrf5_get_probed_chip_if_halted()")
Signed-off-by: Tomas Vanek <va...@fb...>
Change-Id: Ife6071c509719f8d7dc312fe9a780bdcf2575f69
Reviewed-on: https://review.openocd.org/c/openocd/+/8174
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/flash/nor/nrf5.c b/src/flash/nor/nrf5.c
index 3f451a76c..bf8c9da5f 100644
--- a/src/flash/nor/nrf5.c
+++ b/src/flash/nor/nrf5.c
@@ -1071,7 +1071,7 @@ static int nrf5_erase(struct flash_bank *bank, unsigned int first,
}
/* For each sector to be erased */
- for (unsigned int s = first; s <= last && res == ERROR_OK; s++) {
+ for (unsigned int s = first; s <= last; s++) {
if (chip->features & NRF5_FEATURE_SERIES_51
&& bank->sectors[s].is_protected == 1) {
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/nrf5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|