|
From: openocd-gerrit <ope...@us...> - 2023-05-05 22:08:54
|
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 aa1214280d11c32f82961da44dee863098e1ac38 (commit)
via d4fe63e36b662ad274783585ff7222befbf54268 (commit)
from 6e4000df9e37ea7eb857c3dcd707057d47a5d0ca (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 aa1214280d11c32f82961da44dee863098e1ac38
Author: Antonio Borneo <bor...@gm...>
Date: Sun Apr 9 00:00:37 2023 +0200
flash: with pointers, use NULL instead of 0
Don't compare pointers with 0, use NULL when needed.
Don't pass 0 ad pointer argument, pass NULL.
Detected through 'sparse' tool.
Change-Id: I118554fffde41c94cea9e1201ea941ff3c1ee762
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7595
Tested-by: jenkins
diff --git a/src/flash/nand/lpc32xx.c b/src/flash/nand/lpc32xx.c
index 2c578d1b4..f8b59b357 100644
--- a/src/flash/nand/lpc32xx.c
+++ b/src/flash/nand/lpc32xx.c
@@ -1029,7 +1029,7 @@ static int lpc32xx_write_page_slc(struct nand_device *nand,
LOG_DEBUG("SLC write page %" PRIx32 " data=%d, oob=%d, "
"data_size=%" PRIu32 ", oob_size=%" PRIu32,
- page, data != 0, oob != 0, data_size, oob_size);
+ page, !!data, !!oob, data_size, oob_size);
target_mem_base = pworking_area->address;
/*
diff --git a/src/flash/nor/msp432.c b/src/flash/nor/msp432.c
index d9b9695df..5e2935d02 100644
--- a/src/flash/nor/msp432.c
+++ b/src/flash/nor/msp432.c
@@ -375,7 +375,7 @@ static int msp432_init(struct flash_bank *bank)
buf_set_u32(reg_params[0].value, 0, 32, ALGO_STACK_POINTER_ADDR);
/* Begin executing the flash helper algorithm */
- retval = target_start_algorithm(target, 0, 0, 1, reg_params,
+ retval = target_start_algorithm(target, 0, NULL, 1, reg_params,
algo_entry_addr, 0, &msp432_bank->armv7m_info);
destroy_reg_param(®_params[0]);
if (retval != ERROR_OK) {
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index 3a78952ef..972686e3f 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -1342,7 +1342,7 @@ COMMAND_HANDLER(stellaris_handle_recover_command)
* cycle to recover.
*/
- Jim_Eval_Named(CMD_CTX->interp, "catch { hla_command \"debug unlock\" }", 0, 0);
+ Jim_Eval_Named(CMD_CTX->interp, "catch { hla_command \"debug unlock\" }", NULL, 0);
if (!strcmp(Jim_GetString(Jim_GetResult(CMD_CTX->interp), NULL), "0")) {
retval = ERROR_OK;
goto user_action;
commit d4fe63e36b662ad274783585ff7222befbf54268
Author: Antonio Borneo <bor...@gm...>
Date: Sat Apr 8 23:59:42 2023 +0200
flash: nor: add static to local symbols
Add static type to symbols that are not used elsewhere.
Detected through 'sparse' tool.
Change-Id: I2bdac5d2b06a6dbed5c27bfdb1cf36eee90ad823
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7594
Tested-by: jenkins
diff --git a/src/flash/nor/numicro.c b/src/flash/nor/numicro.c
index 0b04ce4b7..a0c6e0c81 100644
--- a/src/flash/nor/numicro.c
+++ b/src/flash/nor/numicro.c
@@ -536,8 +536,8 @@ struct numicro_flash_bank {
};
/* Private variables */
-uint32_t m_page_size = NUMICRO_PAGESIZE;
-uint32_t m_address_bias_offset;
+static uint32_t m_page_size = NUMICRO_PAGESIZE;
+static uint32_t m_address_bias_offset;
/* Private methods */
static int numicro_get_arm_arch(struct target *target)
diff --git a/src/flash/nor/rsl10.c b/src/flash/nor/rsl10.c
index d92c4b8b1..5f0ac9b8f 100644
--- a/src/flash/nor/rsl10.c
+++ b/src/flash/nor/rsl10.c
@@ -107,7 +107,7 @@ static const char *const rsl10_error_list[] = {
[RSL10_FLASH_ERR_PROG_FAILED] = "prog failed",
};
-const char *rsl10_error(enum rsl10_flash_status x)
+static const char *rsl10_error(enum rsl10_flash_status x)
{
if (x >= RSL10_FLASH_MAX_ERR_CODES || !rsl10_error_list[x])
return "unknown";
-----------------------------------------------------------------------
Summary of changes:
src/flash/nand/lpc32xx.c | 2 +-
src/flash/nor/msp432.c | 2 +-
src/flash/nor/numicro.c | 4 ++--
src/flash/nor/rsl10.c | 2 +-
src/flash/nor/stellaris.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|