summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-06-23 00:22:08 +0200
committerTom Rini <trini@ti.com>2014-07-18 17:53:23 -0400
commit0e350f81e1ca7d103fd9685725f9c4b0d9e80632 (patch)
tree05af9f8bb5f3a0c4cc03c7624880d6ee7927b93c /common
parente259d6a320d0280f02966b8bc35316fb136c5e24 (diff)
downloadu-boot-imx-0e350f81e1ca7d103fd9685725f9c4b0d9e80632.zip
u-boot-imx-0e350f81e1ca7d103fd9685725f9c4b0d9e80632.tar.gz
u-boot-imx-0e350f81e1ca7d103fd9685725f9c4b0d9e80632.tar.bz2
common: commands: make commands static
Since most commands are not public, make them static. This prevents warnings that no common prototype is available. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bdinfo.c3
-rw-r--r--common/cmd_cache.c4
-rw-r--r--common/cmd_eeprom.c6
-rw-r--r--common/cmd_ext2.c8
-rw-r--r--common/cmd_fs.c10
-rw-r--r--common/cmd_i2c.c6
-rw-r--r--common/cmd_part.c6
-rw-r--r--common/cmd_pxe.c4
-rw-r--r--common/cmd_source.c3
-rw-r--r--common/cmd_ubi.c2
-rw-r--r--common/cmd_ubifs.c12
11 files changed, 36 insertions, 28 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index f283a16..3d37a86 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -351,7 +351,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_ARM)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
int i;
bd_t *bd = gd->bd;
diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 602feca..37ab345 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -20,7 +20,7 @@ void __weak invalidate_icache_all(void)
puts("No arch specific invalidate_icache_all available!\n");
}
-int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 2: /* on / off */
@@ -52,7 +52,7 @@ void __weak flush_dcache_all(void)
/* please define arch specific flush_dcache_all */
}
-int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 2: /* on / off */
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index fad462f..a02f0cb 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -43,7 +43,7 @@ extern int eeprom_write_enable (unsigned dev_addr, int state);
/* ------------------------------------------------------------------------- */
#if defined(CONFIG_CMD_EEPROM)
-int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
const char *const fmt =
"\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... ";
@@ -413,7 +413,7 @@ U_BOOT_CMD(
"read devaddr addr off cnt\n"
"eeprom write devaddr addr off cnt\n"
" - read/write `cnt' bytes from `devaddr` EEPROM at offset `off'"
-);
+)
#else /* One EEPROM */
U_BOOT_CMD(
eeprom, 5, 1, do_eeprom,
@@ -421,7 +421,7 @@ U_BOOT_CMD(
"read addr off cnt\n"
"eeprom write addr off cnt\n"
" - read/write `cnt' bytes at EEPROM offset `off'"
-);
+)
#endif /* CONFIG_SYS_I2C_MULTI_EEPROMS */
#endif
diff --git a/common/cmd_ext2.c b/common/cmd_ext2.c
index 5a4bcc1..9e82f49 100644
--- a/common/cmd_ext2.c
+++ b/common/cmd_ext2.c
@@ -22,7 +22,7 @@
*/
#include <fs.h>
-int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
@@ -30,7 +30,7 @@ int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/******************************************************************************
* Ext2fs boot command intepreter. Derived from diskboot
*/
-int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
@@ -40,7 +40,7 @@ U_BOOT_CMD(
"list files in a directory (default /)",
"<interface> <dev[:part]> [directory]\n"
" - list files from 'dev' on 'interface' in a 'directory'"
-);
+)
U_BOOT_CMD(
ext2load, 6, 0, do_ext2load,
@@ -48,4 +48,4 @@ U_BOOT_CMD(
"<interface> <dev[:part]> [addr] [filename] [bytes]\n"
" - load binary file 'filename' from 'dev' on 'interface'\n"
" to address 'addr' from ext2 filesystem."
-);
+)
diff --git a/common/cmd_fs.c b/common/cmd_fs.c
index 91a205a..78590d2 100644
--- a/common/cmd_fs.c
+++ b/common/cmd_fs.c
@@ -20,7 +20,8 @@
#include <command.h>
#include <fs.h>
-int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -35,9 +36,10 @@ U_BOOT_CMD(
" If 'bytes' is 0 or omitted, the file is read until the end.\n"
" 'pos' gives the file byte position to start reading from.\n"
" If 'pos' is 0 or omitted, the file is read from the start."
-);
+)
-int do_ls_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ls_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -48,4 +50,4 @@ U_BOOT_CMD(
"<interface> [<dev[:part]> [directory]]\n"
" - List files in directory 'directory' of partition 'part' on\n"
" device type 'interface' instance 'dev'."
-);
+)
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index d714658..3a75f94 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1366,7 +1366,8 @@ int do_edid(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
* Returns zero always.
*/
#if defined(CONFIG_SYS_I2C)
-int do_i2c_show_bus(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
int i;
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
@@ -1425,7 +1426,8 @@ int do_i2c_show_bus(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* on error.
*/
#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS)
-int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
int ret = 0;
unsigned int bus_no;
diff --git a/common/cmd_part.c b/common/cmd_part.c
index c84bc27..39e8666 100644
--- a/common/cmd_part.c
+++ b/common/cmd_part.c
@@ -26,7 +26,7 @@
#error CONFIG_PARTITION_UUIDS must be enabled for CONFIG_CMD_PART to be enabled
#endif
-int do_part_uuid(int argc, char * const argv[])
+static int do_part_uuid(int argc, char * const argv[])
{
int part;
block_dev_desc_t *dev_desc;
@@ -49,7 +49,7 @@ int do_part_uuid(int argc, char * const argv[])
return 0;
}
-int do_part_list(int argc, char * const argv[])
+static int do_part_list(int argc, char * const argv[])
{
int ret;
block_dev_desc_t *desc;
@@ -66,7 +66,7 @@ int do_part_list(int argc, char * const argv[])
return 0;
}
-int do_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 3483328..ba48692 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1562,7 +1562,7 @@ static cmd_tbl_t cmd_pxe_sub[] = {
U_BOOT_CMD_MKENT(boot, 2, 1, do_pxe_boot, "", "")
};
-int do_pxe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pxe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *cp;
@@ -1596,7 +1596,7 @@ U_BOOT_CMD(
*
* Returns 0 on success, 1 on error.
*/
-int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long pxefile_addr_r;
struct pxe_menu *cfg;
diff --git a/common/cmd_source.c b/common/cmd_source.c
index f3e9e60..6881bc9 100644
--- a/common/cmd_source.c
+++ b/common/cmd_source.c
@@ -142,8 +142,7 @@ source (ulong addr, const char *fit_uname)
/**************************************************/
#if defined(CONFIG_CMD_SOURCE)
-int
-do_source (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
ulong addr;
int rcode;
diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index 7c4d950..3c37c93 100644
--- a/common/cmd_ubi.c
+++ b/common/cmd_ubi.c
@@ -287,7 +287,7 @@ out_err:
return err;
}
-int ubi_volume_continue_write(char *volume, void *buf, size_t size)
+static int ubi_volume_continue_write(char *volume, void *buf, size_t size)
{
int err = 1;
struct ubi_volume *vol;
diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c
index fdc8bfe..19c8a43 100644
--- a/common/cmd_ubifs.c
+++ b/common/cmd_ubifs.c
@@ -21,7 +21,8 @@
static int ubifs_initialized;
static int ubifs_mounted;
-int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
char *vol_name;
int ret;
@@ -65,7 +66,8 @@ void cmd_ubifs_umount(void)
ubifs_initialized = 0;
}
-int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
if (argc != 1)
return CMD_RET_USAGE;
@@ -80,7 +82,8 @@ int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
char *filename = "/";
int ret;
@@ -103,7 +106,8 @@ int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return ret;
}
-int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
char *filename;
char *endp;