aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2023-09-05 18:52:38 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-09-23 14:31:25 +0000
commitc20cb28fafaa7c255adccfa3040998fc29628ab9 (patch)
treed538754e3a3a9b5fb092e56580f63eb0849ccafb /src
parent040757b7e6d7bc4951af3d683f774f0660d002b5 (diff)
downloadriscv-openocd-c20cb28fafaa7c255adccfa3040998fc29628ab9.zip
riscv-openocd-c20cb28fafaa7c255adccfa3040998fc29628ab9.tar.gz
riscv-openocd-c20cb28fafaa7c255adccfa3040998fc29628ab9.tar.bz2
flash/nor: remove useless bank->next = NULL
struct flash_bank must be zeroed anyway, calloc() is always used. Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: I7ab3b9c66f99688c6095a0a547a05448c9e37d68 Reviewed-on: https://review.openocd.org/c/openocd/+/7885 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/at91sam7.c2
-rw-r--r--src/flash/nor/cc26xx.c1
-rw-r--r--src/flash/nor/cc3220sf.c1
-rw-r--r--src/flash/nor/npcx.c1
4 files changed, 0 insertions, 5 deletions
diff --git a/src/flash/nor/at91sam7.c b/src/flash/nor/at91sam7.c
index 8bb2994..6879a1b 100644
--- a/src/flash/nor/at91sam7.c
+++ b/src/flash/nor/at91sam7.c
@@ -576,7 +576,6 @@ static int at91sam7_read_part_info(struct flash_bank *bank)
return ERROR_FAIL;
}
fb->name = strdup("sam7_probed");
- fb->next = NULL;
/* link created bank in 'flash_banks' list */
t_bank->next = fb;
@@ -765,7 +764,6 @@ FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
return ERROR_FAIL;
}
fb->name = strdup("sam7_probed");
- fb->next = NULL;
/* link created bank in 'flash_banks' list */
t_bank->next = fb;
diff --git a/src/flash/nor/cc26xx.c b/src/flash/nor/cc26xx.c
index 6256ba6..54d6142 100644
--- a/src/flash/nor/cc26xx.c
+++ b/src/flash/nor/cc26xx.c
@@ -261,7 +261,6 @@ FLASH_BANK_COMMAND_HANDLER(cc26xx_flash_bank_command)
/* Finish initialization of bank */
bank->driver_priv = cc26xx_bank;
- bank->next = NULL;
return ERROR_OK;
}
diff --git a/src/flash/nor/cc3220sf.c b/src/flash/nor/cc3220sf.c
index 432a393..74cb7ae 100644
--- a/src/flash/nor/cc3220sf.c
+++ b/src/flash/nor/cc3220sf.c
@@ -96,7 +96,6 @@ FLASH_BANK_COMMAND_HANDLER(cc3220sf_flash_bank_command)
/* Finish initialization of flash bank */
bank->driver_priv = cc3220sf_bank;
- bank->next = NULL;
return ERROR_OK;
}
diff --git a/src/flash/nor/npcx.c b/src/flash/nor/npcx.c
index 4a301f1..8309630 100644
--- a/src/flash/nor/npcx.c
+++ b/src/flash/nor/npcx.c
@@ -331,7 +331,6 @@ FLASH_BANK_COMMAND_HANDLER(npcx_flash_bank_command)
/* Finish initialization of bank */
bank->driver_priv = npcx_bank;
- bank->next = NULL;
return ERROR_OK;
}