summaryrefslogtreecommitdiff
path: root/cmd/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 20:40:03 +0300
committerTom Rini <trini@konsulko.com>2020-05-19 01:36:55 +0300
commit09140113108541b95d340f3c7b6ee597d31ccc73 (patch)
tree4b4241b799bbbb2eeef4164392442b193af1703f /cmd/x86
parent691d719db7183dfb1d1360efed4c5e9f6899095f (diff)
downloadu-boot-09140113108541b95d340f3c7b6ee597d31ccc73.tar.xz
command: Remove the cmd_tbl_t typedef
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/x86')
-rw-r--r--cmd/x86/exception.c6
-rw-r--r--cmd/x86/fsp.c8
-rw-r--r--cmd/x86/hob.c2
-rw-r--r--cmd/x86/mtrr.c6
4 files changed, 12 insertions, 10 deletions
diff --git a/cmd/x86/exception.c b/cmd/x86/exception.c
index ade1e2ea92..82faaa913e 100644
--- a/cmd/x86/exception.c
+++ b/cmd/x86/exception.c
@@ -8,14 +8,14 @@
#include <common.h>
#include <command.h>
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
asm volatile (".word 0xffff\n");
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
"", ""),
};
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c
index 6e485fb144..8017eda387 100644
--- a/cmd/x86/fsp.c
+++ b/cmd/x86/fsp.c
@@ -9,7 +9,7 @@
DECLARE_GLOBAL_DATA_PTR;
-static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hdr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct fsp_header *hdr;
u32 img_addr;
@@ -80,13 +80,13 @@ static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-static cmd_tbl_t fsp_commands[] = {
+static struct cmd_tbl fsp_commands[] = {
U_BOOT_CMD_MKENT(hdr, 0, 1, do_hdr, "", ""),
};
-static int do_fsp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fsp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *fsp_cmd;
+ struct cmd_tbl *fsp_cmd;
int ret;
if (argc < 2)
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index 29d9e3d5a2..6b1f7bda5b 100644
--- a/cmd/x86/hob.c
+++ b/cmd/x86/hob.c
@@ -26,7 +26,7 @@ static char *hob_type[] = {
"Capsule",
};
-static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hob(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
const struct hob_header *hdr;
uint type;
diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c
index d3fd959235..2c40e711a1 100644
--- a/cmd/x86/mtrr.c
+++ b/cmd/x86/mtrr.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
@@ -43,7 +44,7 @@ static int do_mtrr_list(void)
return 0;
}
-static int do_mtrr_set(uint reg, int argc, char * const argv[])
+static int do_mtrr_set(uint reg, int argc, char *const argv[])
{
const char *typename = argv[0];
struct mtrr_state state;
@@ -98,7 +99,8 @@ static int mtrr_set_valid(int reg, bool valid)
return 0;
}
-static int do_mtrr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *cmd;
uint reg;