From 5308bd991ca63e56c272af47ad6dacf7e4c75569 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sat, 6 May 2023 22:09:06 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.openocd.org/c/openocd/+/7674 Tested-by: jenkins --- src/flash/nand/core.h | 1 + src/flash/nand/tcl.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h index 8f54493af2..137298cbc8 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 4bb15faae7..67a62770fb 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -17,9 +17,6 @@ #include "fileio.h" #include -/* to be removed */ -extern struct nand_device *nand_devices; - COMMAND_HANDLER(handle_nand_list_command) { struct nand_device *p; -- 2.30.2