diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2023-05-06 22:09:06 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2023-05-18 10:15:41 +0000 |
commit | 5308bd991ca63e56c272af47ad6dacf7e4c75569 (patch) | |
tree | 6c711371d7db1e822ea92ade1495c961063dd9e1 /src/flash | |
parent | d5c177cd3def7002f18270742ff3b1380feb45c5 (diff) | |
download | riscv-openocd-5308bd991ca63e56c272af47ad6dacf7e4c75569.zip riscv-openocd-5308bd991ca63e56c272af47ad6dacf7e4c75569.tar.gz riscv-openocd-5308bd991ca63e56c272af47ad6dacf7e4c75569.tar.bz2 |
flash: nand: move in include file the declaration of 'nand_devices'
The pointer nand_devices is used in two file.
Move the extern prototype in code.h
Detected through 'sparse' tool.
Change-Id: I7237359fd1a008770a624725cd0b3d8632b4166e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7674
Tested-by: jenkins
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nand/core.h | 1 | ||||
-rw-r--r-- | src/flash/nand/tcl.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h index 8f54493..137298c 100644 --- a/src/flash/nand/core.h +++ b/src/flash/nand/core.h @@ -179,6 +179,7 @@ enum oob_formats { NAND_OOB_YAFFS2 = 0x100,/* when writing, use YAFFS2 OOB layout */ }; +extern struct nand_device *nand_devices; struct nand_device *get_nand_device_by_num(int num); diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 4bb15fa..67a6277 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -17,9 +17,6 @@ #include "fileio.h" #include <target/target.h> -/* to be removed */ -extern struct nand_device *nand_devices; - COMMAND_HANDLER(handle_nand_list_command) { struct nand_device *p; |