]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - cmd/cbfs.c
Merge branch 'master' of git://git.denx.de/u-boot-rockchip
[people/ms/u-boot.git] / cmd / cbfs.c
index 35d8a7a89bfbea6a12a11d4269528d53133b6aee..95a11a36160aa955339b227c0d6e4a8cb17c7ec8 100644 (file)
@@ -11,7 +11,8 @@
 #include <command.h>
 #include <cbfs.h>
 
-int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
+                       char *const argv[])
 {
        uintptr_t end_of_rom = 0xffffffff;
        char *ep;
@@ -44,7 +45,8 @@ U_BOOT_CMD(
        "      CBFS is in. It defaults to 0xFFFFFFFF\n"
 );
 
-int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc,
+                         char *const argv[])
 {
        const struct cbfs_cachenode *file;
        unsigned long offset;
@@ -90,7 +92,8 @@ U_BOOT_CMD(
        "    - load binary file 'filename' from the cbfs to address 'addr'\n"
 );
 
-int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
+                     char *const argv[])
 {
        const struct cbfs_cachenode *file = file_cbfs_get_first();
        int files = 0;
@@ -103,7 +106,7 @@ int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        printf("     size              type  name\n");
        printf("------------------------------------------\n");
        while (file) {
-               u32 type = file_cbfs_type(file);
+               int type = file_cbfs_type(file);
                char *type_name = NULL;
                const char *filename = file_cbfs_name(file);
 
@@ -140,7 +143,8 @@ int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
                case CBFS_COMPONENT_CMOS_LAYOUT:
                        type_name = "cmos layout";
                        break;
-               case -1UL:
+               case -1:
+               case 0:
                        type_name = "null";
                        break;
                }
@@ -167,7 +171,8 @@ U_BOOT_CMD(
        "    - list the files in the cbfs\n"
 );
 
-int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
+                         char *const argv[])
 {
        const struct cbfs_header *header = file_cbfs_get_header();