Skip to contentSkip to conversation

do_bootm: unify duplicate prototypes

PATCH New Mike Frysinger 2 participants 2 messages Oct 20, 2010 – Nov 28, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do_bootm: unify duplicate prototypes

The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h.

---
 board/barco/barco.c            |    1 -
 board/cm5200/fwupdate.c        |    1 -
 board/esd/common/cmd_loadpci.c |    1 -
 board/esd/cpci750/cpci750.c    |    1 -
 board/esd/pci405/cmd_pci405.c  |    2 --
 board/pn62/cmd_pn62.c          |    2 --
 common/cmd_fdc.c               |    1 -
 common/cmd_fdos.c              |    1 -
 common/cmd_ide.c               |    1 -
 common/cmd_nand.c              |    1 -
 common/cmd_net.c               |    2 --
 common/cmd_scsi.c              |    1 -
 common/cmd_usb.c               |    1 -
 include/command.h              |    2 ++
 14 files changed, 2 insertions(+), 16 deletions(-)
board/barco/barco.c +0 -1
index 263a288..bcf6af2 100644
@@ -257,7 +257,6 @@ void barcobcd_boot (void)
 	char *bootm_args[2];
 	char *buf;
 	int cnt;
-	extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 
 	buf = (char *)(0x00800000);
 	/* make certain there are enough chars to print the command line here!
board/cm5200/fwupdate.c +0 -1
index c1a4a19..9d4eadc 100644
@@ -35,7 +35,6 @@
 
 #include "fwupdate.h"
 
-extern int do_bootm(cmd_tbl_t *, int, int, char * const []);
 extern long do_fat_read(const char *, void *, unsigned long, int);
 extern int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
 
board/esd/common/cmd_loadpci.c +0 -1
index 87da27d..8f4ad84 100644
@@ -29,7 +29,6 @@
 
 #if defined(CONFIG_CMD_BSP)
 
-extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 extern int do_source (cmd_tbl_t *, int, int, char *[]);
 
 #define ADDRMASK 0xfffff000
board/esd/cpci750/cpci750.c +0 -1
index f9f7c7f..f27d65e 100644
@@ -122,7 +122,6 @@ static char show_config_tab[][15] = {{"PCI0DLL_2     "},  /* 31 */
 
 extern flash_info_t flash_info[];
 
-extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 extern int do_bootvx (cmd_tbl_t *, int, int, char *[]);
 
 /* ------------------------------------------------------------------------- */
board/esd/pci405/cmd_pci405.c +0 -2
index 2fc9fda..13f9019 100644
@@ -34,8 +34,6 @@
 
 #if defined(CONFIG_CMD_BSP)
 
-extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
-
 /*
  * Command loadpci: wait for signal from host and boot image.
  */
board/pn62/cmd_pn62.c +0 -2
index 58c680b..939cb4a 100644
@@ -31,8 +31,6 @@
 
 #if defined(CONFIG_CMD_BSP)
 
-extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
-
 /*
  * Command led: controls the various LEDs 0..11 on the PN62 card.
  */
common/cmd_fdc.c +0 -1
index 831a07f..cdb050c 100644
@@ -826,7 +826,6 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	/* Check if we should attempt an auto-start */
 	if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
 		char *local_args[2];
-		extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 
 		local_args[0] = argv[0];
 		local_args[1] = NULL;
common/cmd_fdos.c +0 -1
index a8822d9..2af4ca0 100644
@@ -101,7 +101,6 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
     /* Check if we should attempt an auto-start */
     if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
 	char *local_args[2];
-	extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 	local_args[0] = argv[0];
 	local_args[1] = NULL;
 	printf ("Automatic boot of image at addr 0x%08lX ...\n", load_addr);
common/cmd_ide.c +0 -1
index ea0f4a7..df7bdf5 100644
@@ -498,7 +498,6 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	/* Check if we should attempt an auto-start */
 	if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
 		char *local_args[2];
-		extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 
 		local_args[0] = argv[0];
 		local_args[1] = NULL;
common/cmd_nand.c +0 -1
index 634d036..6783645 100644
@@ -789,7 +789,6 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
 	/* Check if we should attempt an auto-start */
 	if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) {
 		char *local_args[2];
-		extern int do_bootm(cmd_tbl_t *, int, int, char *[]);
 
 		local_args[0] = cmd;
 		local_args[1] = NULL;
common/cmd_net.c +0 -2
index b131006..090ecea 100644
@@ -28,8 +28,6 @@
 #include <command.h>
 #include <net.h>
 
-extern int do_bootm (cmd_tbl_t *, int, int, char * const []);
-
 static int netboot_common (proto_t, cmd_tbl_t *, int , char * const []);
 
 int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
common/cmd_scsi.c +0 -1
index 6b937f9..be4fe74 100644
@@ -329,7 +329,6 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	/* Check if we should attempt an auto-start */
 	if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
 		char *local_args[2];
-		extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 		local_args[0] = argv[0];
 		local_args[1] = NULL;
 		printf ("Automatic boot of image at addr 0x%08lX ...\n", addr);
common/cmd_usb.c +0 -1
index 226ea0d..b04a8df 100644
@@ -490,7 +490,6 @@ int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	/* Check if we should attempt an auto-start */
 	if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) {
 		char *local_args[2];
-		extern int do_bootm(cmd_tbl_t *, int, int, char *[]);
 		local_args[0] = argv[0];
 		local_args[1] = NULL;
 		printf("Automatic boot of image at addr 0x%08lX ...\n", addr);
include/command.h +2 -0
index a153ce9..7cebf8a 100644
@@ -95,6 +95,8 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *
 extern int cmd_get_data_size(char* arg, int default_size);
 #endif
 
+extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+
 #endif	/* __ASSEMBLY__ */
 
 /*
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 do_bootm: unify duplicate prototypes

Dear Mike Frysinger,

Quoted 5 lines · In message <[email protected]> you wrote:

The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h.

Quoted 16 lines
---
 board/barco/barco.c            |    1 -
 board/cm5200/fwupdate.c        |    1 -
 board/esd/common/cmd_loadpci.c |    1 -
 board/esd/cpci750/cpci750.c    |    1 -
 board/esd/pci405/cmd_pci405.c  |    2 --
 board/pn62/cmd_pn62.c          |    2 --
 common/cmd_fdc.c               |    1 -
 common/cmd_fdos.c              |    1 -
 common/cmd_ide.c               |    1 -
 common/cmd_nand.c              |    1 -
 common/cmd_net.c               |    2 --
 common/cmd_scsi.c              |    1 -
 common/cmd_usb.c               |    1 -
 include/command.h              |    2 ++
 14 files changed, 2 insertions(+), 16 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every little picofarad has a nanohenry all its own.      - Don Vonada