From 09140113108541b95d340f3c7b6ee597d31ccc73 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 11:40:03 -0600 Subject: 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 --- cmd/ab_select.c | 5 ++- cmd/abootimg.c | 31 +++++++------- cmd/acpi.c | 4 +- cmd/adc.c | 8 ++-- cmd/adtimg.c | 26 ++++++------ cmd/aes.c | 2 +- cmd/arm/exception.c | 14 +++--- cmd/arm/exception64.c | 6 +-- cmd/armflash.c | 2 +- cmd/avb.c | 40 +++++++++-------- cmd/axi.c | 22 +++++----- cmd/bcb.c | 30 ++++++------- cmd/bdinfo.c | 28 ++++++------ cmd/bedbug.c | 24 +++++++---- cmd/bind.c | 5 ++- cmd/binop.c | 3 +- cmd/blk_common.c | 3 +- cmd/blkcache.c | 17 ++++---- cmd/blob.c | 3 +- cmd/bmp.c | 12 +++--- cmd/boot.c | 4 +- cmd/bootcount.c | 16 +++---- cmd/bootefi.c | 3 +- cmd/booti.c | 6 +-- cmd/bootm.c | 23 +++++----- cmd/bootmenu.c | 2 +- cmd/bootstage.c | 19 +++++---- cmd/bootz.c | 6 +-- cmd/btrfs.c | 2 +- cmd/cache.c | 6 ++- cmd/cbfs.c | 8 ++-- cmd/clk.c | 8 ++-- cmd/cls.c | 2 +- cmd/config.c | 3 +- cmd/conitrace.c | 4 +- cmd/console.c | 3 +- cmd/cpu.c | 12 +++--- cmd/cramfs.c | 5 ++- cmd/cros_ec.c | 7 +-- cmd/dataflash_mmc_mux.c | 3 +- cmd/date.c | 3 +- cmd/demo.c | 22 +++++----- cmd/dfu.c | 3 +- cmd/diag.c | 2 +- cmd/disk.c | 2 +- cmd/dm.c | 22 +++++----- cmd/echo.c | 3 +- cmd/eeprom.c | 4 +- cmd/efi.c | 9 ++-- cmd/efidebug.c | 70 +++++++++++++++--------------- cmd/elf.c | 6 +-- cmd/ethsw.c | 5 ++- cmd/exit.c | 3 +- cmd/ext2.c | 7 ++- cmd/ext4.c | 10 ++--- cmd/fastboot.c | 3 +- cmd/fat.c | 23 +++++----- cmd/fdt.c | 4 +- cmd/fitupd.c | 3 +- cmd/flash.c | 9 ++-- cmd/fpga.c | 41 +++++++++--------- cmd/fpgad.c | 2 +- cmd/fs.c | 23 +++++----- cmd/fs_uuid.c | 4 +- cmd/fuse.c | 3 +- cmd/gettime.c | 4 +- cmd/gpio.c | 3 +- cmd/gpt.c | 2 +- cmd/hash.c | 3 +- cmd/help.c | 9 ++-- cmd/host.c | 37 ++++++++-------- cmd/i2c.c | 61 +++++++++++++++----------- cmd/ide.c | 4 +- cmd/ini.c | 2 +- cmd/io.c | 4 +- cmd/iotrace.c | 6 +-- cmd/irq.c | 6 +-- cmd/itest.c | 3 +- cmd/jffs2.c | 8 ++-- cmd/led.c | 2 +- cmd/legacy_led.c | 2 +- cmd/license.c | 3 +- cmd/load.c | 11 ++--- cmd/log.c | 17 ++++---- cmd/lzmadec.c | 3 +- cmd/mac.c | 3 +- cmd/md5sum.c | 5 ++- cmd/mdio.c | 3 +- cmd/mem.c | 60 ++++++++++++++++---------- cmd/mfsl.c | 6 +-- cmd/mii.c | 2 +- cmd/misc.c | 6 ++- cmd/mmc.c | 111 +++++++++++++++++++++++++++--------------------- cmd/mp.c | 2 +- cmd/mtd.c | 17 ++++---- cmd/mtdparts.c | 7 +-- cmd/mvebu/bubt.c | 2 +- cmd/nand.c | 11 ++--- cmd/net.c | 38 ++++++++++------- cmd/nvedit.c | 62 ++++++++++++++------------- cmd/nvedit_efi.c | 12 +++--- cmd/nvme.c | 3 +- cmd/onenand.c | 33 ++++++++------ cmd/osd.c | 27 ++++++------ cmd/part.c | 15 ++++--- cmd/pcap.c | 20 ++++----- cmd/pci.c | 2 +- cmd/pinmux.c | 17 +++++--- cmd/pmc.c | 12 +++--- cmd/pmic.c | 23 ++++++---- cmd/pxe.c | 19 +++++---- cmd/pxe_utils.c | 28 ++++++------ cmd/pxe_utils.h | 10 ++--- cmd/qfw.c | 19 +++++---- cmd/read.c | 2 +- cmd/reginfo.c | 4 +- cmd/regulator.c | 35 +++++++++------ cmd/reiser.c | 4 +- cmd/remoteproc.c | 14 +++--- cmd/riscv/exception.c | 6 +-- cmd/rng.c | 2 +- cmd/rockusb.c | 3 +- cmd/sata.c | 3 +- cmd/sb.c | 13 +++--- cmd/scsi.c | 6 ++- cmd/setexpr.c | 3 +- cmd/sf.c | 15 ++++--- cmd/sha1sum.c | 2 +- cmd/smccc.c | 3 +- cmd/sound.c | 13 +++--- cmd/source.c | 3 +- cmd/spi.c | 2 +- cmd/spl.c | 15 ++++--- cmd/strings.c | 2 +- cmd/sysboot.c | 12 ++++-- cmd/terminal.c | 2 +- cmd/test.c | 9 ++-- cmd/thordown.c | 3 +- cmd/ti/ddr3.c | 5 ++- cmd/time.c | 3 +- cmd/tlv_eeprom.c | 2 +- cmd/tpm-common.c | 10 ++--- cmd/tpm-user-utils.h | 9 ++-- cmd/tpm-v1.c | 85 ++++++++++++++++++------------------ cmd/tpm-v2.c | 43 ++++++++++--------- cmd/tpm_test.c | 11 ++--- cmd/trace.c | 8 ++-- cmd/tsi148.c | 2 +- cmd/ubi.c | 2 +- cmd/ubifs.c | 17 ++++---- cmd/ufs.c | 2 +- cmd/universe.c | 2 +- cmd/unlz4.c | 3 +- cmd/unzip.c | 7 +-- cmd/usb.c | 5 ++- cmd/usb_gadget_sdp.c | 3 +- cmd/usb_mass_storage.c | 4 +- cmd/version.c | 3 +- cmd/virtio.c | 3 +- cmd/w1.c | 2 +- cmd/wdt.c | 12 +++--- cmd/wol.c | 2 +- cmd/x86/exception.c | 6 +-- cmd/x86/fsp.c | 8 ++-- cmd/x86/hob.c | 2 +- cmd/x86/mtrr.c | 6 ++- cmd/ximg.c | 2 +- cmd/yaffs2.c | 28 ++++++------ cmd/zfs.c | 7 +-- cmd/zip.c | 2 +- 170 files changed, 1080 insertions(+), 880 deletions(-) (limited to 'cmd') diff --git a/cmd/ab_select.c b/cmd/ab_select.c index 7a4e51571b..6298fcfb60 100644 --- a/cmd/ab_select.c +++ b/cmd/ab_select.c @@ -6,10 +6,11 @@ #include #include #include +#include #include -static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_ab_select(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret; struct blk_desc *dev_desc; diff --git a/cmd/abootimg.c b/cmd/abootimg.c index 15e727f4a2..40e8978f15 100644 --- a/cmd/abootimg.c +++ b/cmd/abootimg.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -15,7 +16,7 @@ /* Please use abootimg_addr() macro to obtain the boot image address */ static ulong _abootimg_addr = -1; -static int abootimg_get_ver(int argc, char * const argv[]) +static int abootimg_get_ver(int argc, char *const argv[]) { const struct andr_img_hdr *hdr; int res = CMD_RET_SUCCESS; @@ -40,7 +41,7 @@ exit: return res; } -static int abootimg_get_recovery_dtbo(int argc, char * const argv[]) +static int abootimg_get_recovery_dtbo(int argc, char *const argv[]) { ulong addr; u32 size; @@ -62,7 +63,7 @@ static int abootimg_get_recovery_dtbo(int argc, char * const argv[]) return CMD_RET_SUCCESS; } -static int abootimg_get_dtb_load_addr(int argc, char * const argv[]) +static int abootimg_get_dtb_load_addr(int argc, char *const argv[]) { const struct andr_img_hdr *hdr; int res = CMD_RET_SUCCESS; @@ -93,7 +94,7 @@ exit: return res; } -static int abootimg_get_dtb_by_index(int argc, char * const argv[]) +static int abootimg_get_dtb_by_index(int argc, char *const argv[]) { const char *index_str; u32 num; @@ -140,7 +141,7 @@ static int abootimg_get_dtb_by_index(int argc, char * const argv[]) return CMD_RET_SUCCESS; } -static int abootimg_get_dtb(int argc, char * const argv[]) +static int abootimg_get_dtb(int argc, char *const argv[]) { if (argc < 1) return CMD_RET_USAGE; @@ -151,8 +152,8 @@ static int abootimg_get_dtb(int argc, char * const argv[]) return CMD_RET_USAGE; } -static int do_abootimg_addr(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_abootimg_addr(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char *endp; ulong img_addr; @@ -170,8 +171,8 @@ static int do_abootimg_addr(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_abootimg_get(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_abootimg_get(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *param; @@ -193,8 +194,8 @@ static int do_abootimg_get(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_USAGE; } -static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_abootimg_dump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc != 2) return CMD_RET_USAGE; @@ -209,16 +210,16 @@ static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static cmd_tbl_t cmd_abootimg_sub[] = { +static struct cmd_tbl cmd_abootimg_sub[] = { U_BOOT_CMD_MKENT(addr, 2, 1, do_abootimg_addr, "", ""), U_BOOT_CMD_MKENT(dump, 2, 1, do_abootimg_dump, "", ""), U_BOOT_CMD_MKENT(get, 5, 1, do_abootimg_get, "", ""), }; -static int do_abootimg(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_abootimg(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *cp; + struct cmd_tbl *cp; cp = find_cmd_tbl(argv[1], cmd_abootimg_sub, ARRAY_SIZE(cmd_abootimg_sub)); diff --git a/cmd/acpi.c b/cmd/acpi.c index 203bd93bd5..e9a9161a91 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -137,7 +137,7 @@ static int list_rsdp(struct acpi_rsdp *rsdp) return 0; } -static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct acpi_rsdp *rsdp; @@ -153,7 +153,7 @@ static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_acpi_dump(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_acpi_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const char *name; diff --git a/cmd/adc.c b/cmd/adc.c index 381961cf51..16f914a030 100644 --- a/cmd/adc.c +++ b/cmd/adc.c @@ -8,7 +8,7 @@ #include #include -static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_adc_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *dev; @@ -31,7 +31,7 @@ static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_adc_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *dev; @@ -68,7 +68,7 @@ static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *dev; @@ -95,7 +95,7 @@ static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_adc_scan(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_adc_scan(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct adc_channel ch[ADC_MAX_CHANNEL]; diff --git a/cmd/adtimg.c b/cmd/adtimg.c index 60bb01c349..aa943007f3 100644 --- a/cmd/adtimg.c +++ b/cmd/adtimg.c @@ -5,6 +5,7 @@ * Eugeniu Rosca */ +#include #include #include #include @@ -17,8 +18,8 @@ */ static ulong working_img; -static int do_adtimg_addr(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_addr(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char *endp; ulong hdr_addr; @@ -56,8 +57,8 @@ static int adtimg_check_working_img(void) return CMD_RET_SUCCESS; } -static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_dump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc != 1) return CMD_RET_USAGE; @@ -99,7 +100,7 @@ static int adtimg_getopt_u32(char * const opt, char * const name, u32 *optval) return CMD_RET_SUCCESS; } -static int adtimg_getopt_index(int argc, char * const argv[], u32 *index, +static int adtimg_getopt_index(int argc, char *const argv[], u32 *index, char **avar, char **svar) { int ret; @@ -124,7 +125,7 @@ static int adtimg_getopt_index(int argc, char * const argv[], u32 *index, return CMD_RET_SUCCESS; } -static int adtimg_get_dt_by_index(int argc, char * const argv[]) +static int adtimg_get_dt_by_index(int argc, char *const argv[]) { ulong addr; u32 index, size; @@ -163,7 +164,7 @@ static int adtimg_get_dt_by_index(int argc, char * const argv[]) return CMD_RET_SUCCESS; } -static int adtimg_get_dt(int argc, char * const argv[]) +static int adtimg_get_dt(int argc, char *const argv[]) { if (argc < 2) { printf("Error: No options passed to '%s'\n", argv[0]); @@ -181,8 +182,8 @@ static int adtimg_get_dt(int argc, char * const argv[]) return CMD_RET_FAILURE; } -static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_adtimg_get(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { if (argc < 2) { printf("Error: No arguments passed to '%s'\n", argv[0]); @@ -203,15 +204,16 @@ static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_adtimg_sub[] = { +static struct cmd_tbl cmd_adtimg_sub[] = { U_BOOT_CMD_MKENT(addr, CONFIG_SYS_MAXARGS, 1, do_adtimg_addr, "", ""), U_BOOT_CMD_MKENT(dump, CONFIG_SYS_MAXARGS, 1, do_adtimg_dump, "", ""), U_BOOT_CMD_MKENT(get, CONFIG_SYS_MAXARGS, 1, do_adtimg_get, "", ""), }; -static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_adtimg(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *cp; + struct cmd_tbl *cp; cp = find_cmd_tbl(argv[1], cmd_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub)); diff --git a/cmd/aes.c b/cmd/aes.c index 8c5b42fd2c..4c0dad9932 100644 --- a/cmd/aes.c +++ b/cmd/aes.c @@ -35,7 +35,7 @@ u32 aes_get_key_len(char *command) * Returns zero on success, CMD_RET_USAGE in case of misuse and negative * on error. */ -static int do_aes(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +static int do_aes(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uint32_t key_addr, iv_addr, src_addr, dst_addr, len; uint8_t *key_ptr, *iv_ptr, *src_ptr, *dst_ptr; diff --git a/cmd/arm/exception.c b/cmd/arm/exception.c index 33bc75976f..522f6dff53 100644 --- a/cmd/arm/exception.c +++ b/cmd/arm/exception.c @@ -8,8 +8,8 @@ #include #include -static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_unaligned(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* * The LDRD instruction requires the data source to be four byte aligned @@ -23,15 +23,15 @@ static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static int do_breakpoint(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_breakpoint(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { asm volatile ("BKPT #123\n"); return CMD_RET_FAILURE; } -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[]) { /* * 0xe7f...f. is undefined in ARM mode @@ -41,7 +41,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_sub[] = { +static struct cmd_tbl cmd_sub[] = { U_BOOT_CMD_MKENT(breakpoint, CONFIG_SYS_MAXARGS, 1, do_breakpoint, "", ""), U_BOOT_CMD_MKENT(unaligned, CONFIG_SYS_MAXARGS, 1, do_unaligned, diff --git a/cmd/arm/exception64.c b/cmd/arm/exception64.c index a363818532..d5de50a080 100644 --- a/cmd/arm/exception64.c +++ b/cmd/arm/exception64.c @@ -8,8 +8,8 @@ #include #include -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[]) { /* * 0xe7f...f. is undefined in ARM mode @@ -19,7 +19,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc, 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/armflash.c b/cmd/armflash.c index f82f3dd1a3..5e7315eb7c 100644 --- a/cmd/armflash.c +++ b/cmd/armflash.c @@ -267,7 +267,7 @@ static int exists(const char * const name) return CMD_RET_FAILURE; } -static int do_afs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_afs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret = CMD_RET_SUCCESS; diff --git a/cmd/avb.c b/cmd/avb.c index a4de5c40a2..398ad3ba97 100644 --- a/cmd/avb.c +++ b/cmd/avb.c @@ -15,7 +15,7 @@ #define AVB_BOOTARGS "avb_bootargs" static struct AvbOps *avb_ops; -int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned long mmc_dev; @@ -36,7 +36,8 @@ int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_read_part(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *part; s64 offset; @@ -68,7 +69,7 @@ int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc, +int do_avb_read_part_hex(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const char *part; @@ -114,7 +115,8 @@ int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_write_part(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *part; s64 offset; @@ -145,7 +147,8 @@ int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_read_rb(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { size_t index; u64 rb_idx; @@ -171,7 +174,8 @@ int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_avb_write_rb(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { size_t index; u64 rb_idx; @@ -196,8 +200,8 @@ int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } -int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +int do_avb_get_uuid(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { const char *part; char buffer[UUID_STR_LEN + 1]; @@ -224,7 +228,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag, return CMD_RET_FAILURE; } -int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag, +int do_avb_verify_part(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const char * const requested_partitions[] = {"boot", NULL}; @@ -315,8 +319,8 @@ int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag, return res; } -int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +int do_avb_is_unlocked(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { bool unlock; @@ -341,8 +345,8 @@ int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag, return CMD_RET_FAILURE; } -int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_avb_read_pvalue(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *name; size_t bytes; @@ -382,8 +386,8 @@ int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +int do_avb_write_pvalue(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { const char *name; const char *value; @@ -411,7 +415,7 @@ int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_avb[] = { +static struct cmd_tbl cmd_avb[] = { U_BOOT_CMD_MKENT(init, 2, 0, do_avb_init, "", ""), U_BOOT_CMD_MKENT(read_rb, 2, 0, do_avb_read_rb, "", ""), U_BOOT_CMD_MKENT(write_rb, 3, 0, do_avb_write_rb, "", ""), @@ -427,9 +431,9 @@ static cmd_tbl_t cmd_avb[] = { #endif }; -static int do_avb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_avb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *cp; + struct cmd_tbl *cp; cp = find_cmd_tbl(argv[1], cmd_avb, ARRAY_SIZE(cmd_avb)); diff --git a/cmd/axi.c b/cmd/axi.c index 588098fddd..18533efc0d 100644 --- a/cmd/axi.c +++ b/cmd/axi.c @@ -96,8 +96,8 @@ static int axi_get_cur_bus(struct udevice **busp) * Command handlers */ -static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_axi_show_bus(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dummy; @@ -135,8 +135,8 @@ static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_axi_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret = 0; int bus_no; @@ -163,7 +163,8 @@ static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc, return ret ? CMD_RET_FAILURE : 0; } -static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_axi_md(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* Print that many bytes per line */ const uint DISP_LINE_LEN = 16; @@ -261,7 +262,8 @@ static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_axi_mw(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { u32 writeval; ulong addr, count, size; @@ -312,17 +314,17 @@ static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } -static cmd_tbl_t cmd_axi_sub[] = { +static struct cmd_tbl cmd_axi_sub[] = { U_BOOT_CMD_MKENT(bus, 1, 1, do_axi_show_bus, "", ""), U_BOOT_CMD_MKENT(dev, 1, 1, do_axi_bus_num, "", ""), U_BOOT_CMD_MKENT(md, 4, 1, do_axi_md, "", ""), U_BOOT_CMD_MKENT(mw, 5, 1, do_axi_mw, "", ""), }; -static int do_ihs_axi(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_ihs_axi(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; if (argc < 2) return CMD_RET_USAGE; diff --git a/cmd/bcb.c b/cmd/bcb.c index b944e62b6a..d99a698012 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -109,8 +109,8 @@ static int bcb_field_get(char *name, char **fieldp, int *sizep) return 0; } -static int do_bcb_load(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_load(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct blk_desc *desc; struct disk_partition info; @@ -162,8 +162,8 @@ err: return CMD_RET_FAILURE; } -static int do_bcb_set(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_set(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size, len; char *field, *str, *found; @@ -189,8 +189,8 @@ static int do_bcb_set(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_bcb_clear(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_clear(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size; char *field; @@ -208,8 +208,8 @@ static int do_bcb_clear(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_bcb_test(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_test(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size; char *field; @@ -235,8 +235,8 @@ static int do_bcb_test(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } -static int do_bcb_dump(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_dump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int size; char *field; @@ -249,8 +249,8 @@ static int do_bcb_dump(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static int do_bcb_store(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bcb_store(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct blk_desc *desc; struct disk_partition info; @@ -281,7 +281,7 @@ err: return CMD_RET_FAILURE; } -static cmd_tbl_t cmd_bcb_sub[] = { +static struct cmd_tbl cmd_bcb_sub[] = { U_BOOT_CMD_MKENT(load, CONFIG_SYS_MAXARGS, 1, do_bcb_load, "", ""), U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 1, do_bcb_set, "", ""), U_BOOT_CMD_MKENT(clear, CONFIG_SYS_MAXARGS, 1, do_bcb_clear, "", ""), @@ -290,9 +290,9 @@ static cmd_tbl_t cmd_bcb_sub[] = { U_BOOT_CMD_MKENT(store, CONFIG_SYS_MAXARGS, 1, do_bcb_store, "", ""), }; -static int do_bcb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +static int do_bcb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; if (argc < 2) return CMD_RET_USAGE; diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index ec399c07ae..dba552b03f 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -177,7 +177,7 @@ void __weak board_detail(void) /* Please define board_detail() for your platform */ } -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -222,7 +222,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_NIOS2) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -243,7 +243,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_MICROBLAZE) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -269,7 +269,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_M68K) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -301,7 +301,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_MIPS) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { print_std_bdinfo(gd->bd); print_num("relocaddr", gd->relocaddr); @@ -313,8 +313,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_ARM) -static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { bd_t *bd = gd->bd; @@ -374,7 +374,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, #elif defined(CONFIG_SH) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -389,7 +389,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_X86) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -411,7 +411,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_SANDBOX) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -429,7 +429,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_NDS32) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -445,7 +445,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_RISCV) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -462,7 +462,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_ARC) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { bd_t *bd = gd->bd; @@ -476,7 +476,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_XTENSA) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { print_std_bdinfo(gd->bd); return 0; diff --git a/cmd/bedbug.c b/cmd/bedbug.c index d3e31212ea..425ba4af1f 100644 --- a/cmd/bedbug.c +++ b/cmd/bedbug.c @@ -56,7 +56,8 @@ int bedbug_init(void) * Entry point from the interpreter to the disassembler. Repeated calls * will resume from the last disassembled address. * ====================================================================== */ -int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_dis(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong addr; /* Address to start disassembly from */ ulong len; /* # of instructions to disassemble */ @@ -96,7 +97,8 @@ U_BOOT_CMD (ds, 3, 1, do_bedbug_dis, * instructions in consecutive memory locations until a '.' (period) is * entered on a line by itself. * ====================================================================== */ -int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_asm(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { long mem_addr; /* Address to assemble into */ unsigned long instr; /* Machine code for text */ @@ -146,7 +148,8 @@ U_BOOT_CMD (as, 2, 0, do_bedbug_asm, * CPU-specific break point set routine. * ====================================================================== */ -int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_break(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* -------------------------------------------------- */ if (bug_ctx.do_break) @@ -242,7 +245,8 @@ void bedbug_main_loop (unsigned long addr, struct pt_regs *regs) * stopped flag in the context so that the breakpoint routine will * return. * ====================================================================== */ -int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_continue(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* -------------------------------------------------- */ @@ -265,7 +269,8 @@ U_BOOT_CMD (continue, 1, 0, do_bedbug_continue, * the address passes control to the CPU-specific set breakpoint routine * for the current breakpoint number. * ====================================================================== */ -int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_step(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long addr; /* Address to stop at */ @@ -296,7 +301,8 @@ U_BOOT_CMD (step, 1, 1, do_bedbug_step, * the address passes control to the CPU-specific set breakpoint routine * for the current breakpoint number. * ====================================================================== */ -int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_next(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long addr; /* Address to stop at */ @@ -325,7 +331,8 @@ U_BOOT_CMD (next, 1, 1, do_bedbug_next, * Interpreter command to print the current stack. This assumes an EABI * architecture, so it starts with GPR R1 and works back up the stack. * ====================================================================== */ -int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_stack(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { unsigned long sp; /* Stack pointer */ unsigned long func; /* LR from stack */ @@ -370,7 +377,8 @@ U_BOOT_CMD (where, 1, 1, do_bedbug_stack, * Interpreter command to dump the registers. Calls the CPU-specific * show registers routine. * ====================================================================== */ -int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_bedbug_rdump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* -------------------------------------------------- */ diff --git a/cmd/bind.c b/cmd/bind.c index 44a5f17f0d..068b1399ab 100644 --- a/cmd/bind.c +++ b/cmd/bind.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -194,8 +195,8 @@ static int unbind_by_node_path(const char *path) return 0; } -static int do_bind_unbind(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bind_unbind(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret = 0; bool bind; diff --git a/cmd/binop.c b/cmd/binop.c index 6d2df5f3dd..c85cb51568 100644 --- a/cmd/binop.c +++ b/cmd/binop.c @@ -64,7 +64,8 @@ void write_to_mem(char *varname, u8 *result, ulong len) unmap_sysmem(buf); } -static int do_binop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_binop(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong len; u8 *result, *src1, *src2; diff --git a/cmd/blk_common.c b/cmd/blk_common.c index cc6e161ba0..87f94b5abb 100644 --- a/cmd/blk_common.c +++ b/cmd/blk_common.c @@ -10,8 +10,9 @@ #include #include +#include -int blk_common_cmd(int argc, char * const argv[], enum if_type if_type, +int blk_common_cmd(int argc, char *const argv[], enum if_type if_type, int *cur_devnump) { const char *if_name = blk_get_if_type_name(if_type); diff --git a/cmd/blkcache.c b/cmd/blkcache.c index 2cc65a9ee7..25f252e455 100644 --- a/cmd/blkcache.c +++ b/cmd/blkcache.c @@ -4,13 +4,14 @@ * Author: Eric Nelson * */ +#include #include #include #include #include -static int blkc_show(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int blkc_show(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { struct block_cache_stats stats; blkcache_stats(&stats); @@ -25,8 +26,8 @@ static int blkc_show(cmd_tbl_t *cmdtp, int flag, return 0; } -static int blkc_configure(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int blkc_configure(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { unsigned blocks_per_entry, max_entries; if (argc != 3) @@ -40,7 +41,7 @@ static int blkc_configure(cmd_tbl_t *cmdtp, int flag, return 0; } -static cmd_tbl_t cmd_blkc_sub[] = { +static struct cmd_tbl cmd_blkc_sub[] = { U_BOOT_CMD_MKENT(show, 0, 0, blkc_show, "", ""), U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""), }; @@ -55,10 +56,10 @@ static __maybe_unused void blkc_reloc(void) }; } -static int do_blkcache(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_blkcache(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; #ifdef CONFIG_NEEDS_MANUAL_RELOC blkc_reloc(); diff --git a/cmd/blob.c b/cmd/blob.c index 80478b8802..c80e6977b4 100644 --- a/cmd/blob.c +++ b/cmd/blob.c @@ -48,7 +48,8 @@ __weak int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len) * Returns zero on success, CMD_RET_USAGE in case of misuse and negative * on error. */ -static int do_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +static int do_blob(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong key_addr, src_addr, dst_addr, len; uint8_t *km_ptr, *src_ptr, *dst_ptr; diff --git a/cmd/bmp.c b/cmd/bmp.c index edf4f56426..0ad23231cb 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -91,7 +91,8 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, } #endif -static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +static int do_bmp_info(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong addr; @@ -109,7 +110,8 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[ return (bmp_info(addr)); } -static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +static int do_bmp_display(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong addr; int x = 0, y = 0; @@ -141,7 +143,7 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar return (bmp_display(addr, x, y)); } -static cmd_tbl_t cmd_bmp_sub[] = { +static struct cmd_tbl cmd_bmp_sub[] = { U_BOOT_CMD_MKENT(info, 3, 0, do_bmp_info, "", ""), U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""), }; @@ -162,9 +164,9 @@ void bmp_reloc(void) { * Return: None * */ -static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_bmp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; /* Strip off leading 'bmp' command argument */ argc--; diff --git a/cmd/boot.c b/cmd/boot.c index 9150fce80b..36aba22b30 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -16,12 +16,12 @@ /* Allow ports to override the default behavior */ __attribute__((weak)) unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, - char * const argv[]) + char *const argv[]) { return entry (argc, argv); } -static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { ulong addr, rc; int rcode = 0; diff --git a/cmd/bootcount.c b/cmd/bootcount.c index c358418ebe..654bbb805c 100644 --- a/cmd/bootcount.c +++ b/cmd/bootcount.c @@ -4,15 +4,15 @@ #include #include -static int do_bootcount_print(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootcount_print(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { printf("%lu\n", bootcount_load()); return CMD_RET_SUCCESS; } -static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootcount_reset(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { /* * note that we're explicitly not resetting the environment @@ -22,15 +22,15 @@ static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -static cmd_tbl_t bootcount_sub[] = { +static struct cmd_tbl bootcount_sub[] = { U_BOOT_CMD_MKENT(print, 1, 1, do_bootcount_print, "", ""), U_BOOT_CMD_MKENT(reset, 1, 1, do_bootcount_reset, "", ""), }; -static int do_bootcount(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootcount(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *cp; + struct cmd_tbl *cp; if (argc < 2) return CMD_RET_USAGE; diff --git a/cmd/bootefi.c b/cmd/bootefi.c index b84373453d..0f6d0f7750 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -595,7 +595,8 @@ static int do_efi_selftest(void) * @argv: command line arguments * Return: status code */ -static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { efi_status_t ret; void *fdt; diff --git a/cmd/booti.c b/cmd/booti.c index 4fff8cfcf6..ead2332631 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -18,8 +18,8 @@ DECLARE_GLOBAL_DATA_PTR; /* * Image booting support */ -static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[], bootm_headers_t *images) +static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], bootm_headers_t *images) { int ret; ulong ld; @@ -98,7 +98,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; diff --git a/cmd/bootm.c b/cmd/bootm.c index 931d53f0c7..d5f877cb54 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -34,12 +34,13 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */ #endif #if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND) -static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]); #endif /* we overload the cmd field with our state machine info instead of a * function pointer */ -static cmd_tbl_t cmd_bootm_sub[] = { +static struct cmd_tbl cmd_bootm_sub[] = { U_BOOT_CMD_MKENT(start, 0, 1, (void *)BOOTM_STATE_START, "", ""), U_BOOT_CMD_MKENT(loados, 0, 1, (void *)BOOTM_STATE_LOADOS, "", ""), #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH @@ -55,12 +56,12 @@ static cmd_tbl_t cmd_bootm_sub[] = { U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""), }; -static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret = 0; long state; - cmd_tbl_t *c; + struct cmd_tbl *c; c = find_cmd_tbl(argv[0], &cmd_bootm_sub[0], ARRAY_SIZE(cmd_bootm_sub)); argc--; argv++; @@ -89,7 +90,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, /* bootm - boot application image from image in memory */ /*******************************************************************/ -int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { #ifdef CONFIG_NEEDS_MANUAL_RELOC static int relocated = 0; @@ -136,7 +137,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) BOOTM_STATE_OS_GO, &images, 1); } -int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd) +int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd) { const char *ep = env_get("autostart"); @@ -201,7 +202,7 @@ U_BOOT_CMD( /* bootd - boot default image */ /*******************************************************************/ #if defined(CONFIG_CMD_BOOTD) -int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { return run_command(env_get("bootcmd"), flag); } @@ -226,7 +227,8 @@ U_BOOT_CMD( /* iminfo - print header info for a requested image */ /*******************************************************************/ #if defined(CONFIG_CMD_IMI) -static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_iminfo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int arg; ulong addr; @@ -519,7 +521,8 @@ static int do_imls_nand(void) #endif #if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND) -static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret_nor = 0, ret_nand = 0; diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 6af0617e65..2e3f56e152 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -482,7 +482,7 @@ int menu_show(int bootdelay) } #endif -int do_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +int do_bootmenu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { char *delay_str = NULL; int delay = 10; diff --git a/cmd/bootstage.c b/cmd/bootstage.c index f1ea4e9598..0e623f216b 100644 --- a/cmd/bootstage.c +++ b/cmd/bootstage.c @@ -5,16 +5,17 @@ #include #include +#include -static int do_bootstage_report(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootstage_report(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { bootstage_report(); return 0; } -static int get_base_size(int argc, char * const argv[], ulong *basep, +static int get_base_size(int argc, char *const argv[], ulong *basep, ulong *sizep) { char *endp; @@ -35,8 +36,8 @@ static int get_base_size(int argc, char * const argv[], ulong *basep, return 0; } -static int do_bootstage_stash(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_bootstage_stash(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { ulong base, size; int ret; @@ -58,7 +59,7 @@ static int do_bootstage_stash(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static cmd_tbl_t cmd_bootstage_sub[] = { +static struct cmd_tbl cmd_bootstage_sub[] = { U_BOOT_CMD_MKENT(report, 2, 1, do_bootstage_report, "", ""), U_BOOT_CMD_MKENT(stash, 4, 0, do_bootstage_stash, "", ""), U_BOOT_CMD_MKENT(unstash, 4, 0, do_bootstage_stash, "", ""), @@ -67,10 +68,10 @@ static cmd_tbl_t cmd_bootstage_sub[] = { /* * Process a bootstage sub-command */ -static int do_boostage(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_boostage(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; /* Strip off leading 'bootstage' command argument */ argc--; diff --git a/cmd/bootz.c b/cmd/bootz.c index f14a5fefbf..ac15856f8d 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -23,8 +23,8 @@ int __weak bootz_setup(ulong image, ulong *start, ulong *end) /* * zImage booting support */ -static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[], bootm_headers_t *images) +static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], bootm_headers_t *images) { int ret; ulong zi_start, zi_end; @@ -59,7 +59,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; diff --git a/cmd/btrfs.c b/cmd/btrfs.c index faa1239cc8..7e3cbe12ce 100644 --- a/cmd/btrfs.c +++ b/cmd/btrfs.c @@ -8,7 +8,7 @@ #include #include -int do_btrsubvol(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +int do_btrsubvol(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc != 3) return CMD_RET_USAGE; diff --git a/cmd/cache.c b/cmd/cache.c index 7678615dd8..b68d45b98b 100644 --- a/cmd/cache.c +++ b/cmd/cache.c @@ -24,7 +24,8 @@ __weak void noncached_set_region(void) { } -static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { switch (argc) { case 2: /* on / off / flush */ @@ -58,7 +59,8 @@ void __weak flush_dcache_all(void) /* please define arch specific flush_dcache_all */ } -static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { switch (argc) { case 2: /* on / off / flush */ diff --git a/cmd/cbfs.c b/cmd/cbfs.c index 98e652a4e7..8e91d4bb8c 100644 --- a/cmd/cbfs.c +++ b/cmd/cbfs.c @@ -11,7 +11,7 @@ #include #include -static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uintptr_t end_of_rom = 0xffffffff; @@ -45,7 +45,7 @@ U_BOOT_CMD( " CBFS is in. It defaults to 0xFFFFFFFF\n" ); -static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_fsload(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const struct cbfs_cachenode *file; @@ -92,7 +92,7 @@ U_BOOT_CMD( " - load binary file 'filename' from the cbfs to address 'addr'\n" ); -static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const struct cbfs_cachenode *file = file_cbfs_get_first(); @@ -201,7 +201,7 @@ U_BOOT_CMD( " - list the files in the cbfs\n" ); -static int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cbfs_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { const struct cbfs_header *header = file_cbfs_get_header(); diff --git a/cmd/clk.c b/cmd/clk.c index 74ad868500..439736d072 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -72,7 +72,7 @@ int __weak soc_clk_dump(void) } #endif -static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; @@ -86,14 +86,14 @@ static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -static cmd_tbl_t cmd_clk_sub[] = { +static struct cmd_tbl cmd_clk_sub[] = { U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""), }; -static int do_clk(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_clk(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *c; + struct cmd_tbl *c; if (argc < 2) return CMD_RET_USAGE; diff --git a/cmd/cls.c b/cmd/cls.c index f1ce6e8df1..eab4e6993b 100644 --- a/cmd/cls.c +++ b/cmd/cls.c @@ -11,7 +11,7 @@ #include #include -static int do_video_clear(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { #if defined(CONFIG_DM_VIDEO) diff --git a/cmd/config.c b/cmd/config.c index d2810d573b..cf30841a35 100644 --- a/cmd/config.c +++ b/cmd/config.c @@ -11,7 +11,8 @@ #include "config_data_gz.h" #include "config_data_size.h" -static int do_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_config(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char *dst; unsigned long len = data_size; diff --git a/cmd/conitrace.c b/cmd/conitrace.c index 85c5422b7e..e45e87a64c 100644 --- a/cmd/conitrace.c +++ b/cmd/conitrace.c @@ -8,8 +8,8 @@ #include #include -static int do_conitrace(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { bool first = true; diff --git a/cmd/console.c b/cmd/console.c index 3f1d98b17b..9a1db83c7c 100644 --- a/cmd/console.c +++ b/cmd/console.c @@ -12,7 +12,8 @@ #include extern void _do_coninfo (void); -static int do_coninfo(cmd_tbl_t *cmd, int flag, int argc, char * const argv[]) +static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc, + char *const argv[]) { int l; struct list_head *list = stdio_get_list(); diff --git a/cmd/cpu.c b/cmd/cpu.c index 8c0abc1756..ff553c16c4 100644 --- a/cmd/cpu.c +++ b/cmd/cpu.c @@ -64,7 +64,7 @@ static int print_cpu_list(bool detail) return 0; } -static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cpu_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (print_cpu_list(false)) @@ -73,7 +73,7 @@ static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_cpu_detail(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (print_cpu_list(true)) @@ -82,7 +82,7 @@ static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static cmd_tbl_t cmd_cpu_sub[] = { +static struct cmd_tbl cmd_cpu_sub[] = { U_BOOT_CMD_MKENT(list, 2, 1, do_cpu_list, "", ""), U_BOOT_CMD_MKENT(detail, 4, 0, do_cpu_detail, "", ""), }; @@ -90,10 +90,10 @@ static cmd_tbl_t cmd_cpu_sub[] = { /* * Process a cpu sub-command */ -static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_cpu(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *c = NULL; + struct cmd_tbl *c = NULL; /* Strip off leading 'cpu' command argument */ argc--; diff --git a/cmd/cramfs.c b/cmd/cramfs.c index ad232deae0..1aeb56702c 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -94,7 +94,8 @@ extern int cramfs_info (struct part_info *info); * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_cramfs_load(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { char *filename; int size; @@ -162,7 +163,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * @param argv arguments list * @return 0 on success, 1 otherwise */ -int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_cramfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { char *filename = "/"; int ret; diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index c6bbed9c4a..3c7dd4db9b 100644 --- a/cmd/cros_ec.c +++ b/cmd/cros_ec.c @@ -24,7 +24,7 @@ static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"}; * @param argv List of remaining parameters * @return flash region (EC_FLASH_REGION_...) or -1 on error */ -static int cros_ec_decode_region(int argc, char * const argv[]) +static int cros_ec_decode_region(int argc, char *const argv[]) { if (argc > 0) { if (0 == strcmp(*argv, "rw")) @@ -51,7 +51,7 @@ static int cros_ec_decode_region(int argc, char * const argv[]) * (negative EC_RES_...) */ static int do_read_write(struct udevice *dev, int is_write, int argc, - char * const argv[]) + char *const argv[]) { uint32_t offset, size = -1U, region_size; unsigned long addr; @@ -93,7 +93,8 @@ static int do_read_write(struct udevice *dev, int is_write, int argc, return 0; } -static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_cros_ec(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct udevice *dev; const char *cmd; diff --git a/cmd/dataflash_mmc_mux.c b/cmd/dataflash_mmc_mux.c index 9f271b6f61..73876e9464 100644 --- a/cmd/dataflash_mmc_mux.c +++ b/cmd/dataflash_mmc_mux.c @@ -9,7 +9,8 @@ static int mmc_nspi (const char *); -int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_dataflash_mmc_mux(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { switch (argc) { case 2: /* on / off */ diff --git a/cmd/date.c b/cmd/date.c index 7fa950a902..75a032cd27 100644 --- a/cmd/date.c +++ b/cmd/date.c @@ -29,7 +29,8 @@ int mk_date (const char *, struct rtc_time *); static struct rtc_time default_tm = { 0, 0, 0, 1, 1, 2000, 6, 0, 0 }; -static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct rtc_time tm; int rcode = 0; diff --git a/cmd/demo.c b/cmd/demo.c index 52c6e7ec15..9da06f5e4d 100644 --- a/cmd/demo.c +++ b/cmd/demo.c @@ -7,14 +7,15 @@ */ #include +#include #include #include #include struct udevice *demo_dev; -static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_demo_hello(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ch = 0; @@ -24,8 +25,8 @@ static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc, return demo_hello(demo_dev, ch); } -static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_demo_status(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int status; int ret; @@ -39,8 +40,8 @@ static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_demo_light(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int light; int ret; @@ -59,7 +60,7 @@ static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc, return ret; } -int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct udevice *dev; int i, ret; @@ -78,16 +79,17 @@ int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return cmd_process_error(cmdtp, ret); } -static cmd_tbl_t demo_commands[] = { +static struct cmd_tbl demo_commands[] = { U_BOOT_CMD_MKENT(list, 0, 1, do_demo_list, "", ""), U_BOOT_CMD_MKENT(hello, 2, 1, do_demo_hello, "", ""), U_BOOT_CMD_MKENT(light, 2, 1, do_demo_light, "", ""), U_BOOT_CMD_MKENT(status, 1, 1, do_demo_status, "", ""), }; -static int do_demo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_demo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - cmd_tbl_t *demo_cmd; + struct cmd_tbl *demo_cmd; int devnum = 0; int ret; diff --git a/cmd/dfu.c b/cmd/dfu.c index b30f8a5667..7310595a02 100644 --- a/cmd/dfu.c +++ b/cmd/dfu.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -18,7 +19,7 @@ #include #include -static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc < 2) diff --git a/cmd/diag.c b/cmd/diag.c index 8d21c7dde8..f51536dbfa 100644 --- a/cmd/diag.c +++ b/cmd/diag.c @@ -11,7 +11,7 @@ #include #include -int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +int do_diag(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { unsigned int i; diff --git a/cmd/disk.c b/cmd/disk.c index da0660148c..dbd08a06b2 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -10,7 +10,7 @@ #include #include -int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, +int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc, char *const argv[]) { __maybe_unused int dev; diff --git a/cmd/dm.c b/cmd/dm.c index 7a90685f8b..4e307ac524 100644 --- a/cmd/dm.c +++ b/cmd/dm.c @@ -16,39 +16,39 @@ #include #include -static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_all(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_all(); return 0; } -static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_uclass(); return 0; } -static int do_dm_dump_devres(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_devres(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_devres(); return 0; } -static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[]) +static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { dm_dump_drivers(); return 0; } -static cmd_tbl_t test_commands[] = { +static struct cmd_tbl test_commands[] = { U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""), U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""), U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""), @@ -65,9 +65,9 @@ static __maybe_unused void dm_reloc(void) } } -static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *test_cmd; + struct cmd_tbl *test_cmd; int ret; #ifdef CONFIG_NEEDS_MANUAL_RELOC diff --git a/cmd/echo.c b/cmd/echo.c index 5b018d9349..d02a4cfd58 100644 --- a/cmd/echo.c +++ b/cmd/echo.c @@ -7,7 +7,8 @@ #include #include -static int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_echo(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int i; int putnl = 1; diff --git a/cmd/eeprom.c b/cmd/eeprom.c index 792415ef93..f61a5510e8 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -237,7 +237,7 @@ static int parse_numeric_param(char *str) * @returns: number of arguments parsed or CMD_RET_USAGE if error */ static int parse_i2c_bus_addr(int *i2c_bus, ulong *i2c_addr, int argc, - char * const argv[], int argc_no_bus_addr) + char *const argv[], int argc_no_bus_addr) { int argc_no_bus = argc_no_bus_addr + 1; int argc_bus_addr = argc_no_bus_addr + 2; @@ -355,7 +355,7 @@ static int eeprom_execute_command(enum eeprom_action action, int i2c_bus, } #define NEXT_PARAM(argc, index) { (argc)--; (index)++; } -int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int layout_ver = LAYOUT_VERSION_AUTODETECT; enum eeprom_action action = EEPROM_ACTION_INVALID; diff --git a/cmd/efi.c b/cmd/efi.c index ea239a01f0..c7640c862e 100644 --- a/cmd/efi.c +++ b/cmd/efi.c @@ -191,7 +191,8 @@ static void efi_print_mem_table(struct efi_entry_memmap *map, printf("*Some areas are merged (use 'all' to see)\n"); } -static int do_efi_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_efi_mem(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { struct efi_mem_desc *desc; struct efi_entry_memmap *map; @@ -231,13 +232,13 @@ done: return ret ? CMD_RET_FAILURE : 0; } -static cmd_tbl_t efi_commands[] = { +static struct cmd_tbl efi_commands[] = { U_BOOT_CMD_MKENT(mem, 1, 1, do_efi_mem, "", ""), }; -static int do_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +static int do_efi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - cmd_tbl_t *efi_cmd; + struct cmd_tbl *efi_cmd; int ret; if (argc < 2) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index f020d95dbb..9b5bf1e6cf 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -60,8 +60,8 @@ static const char sep[] = "================"; * Implement efidebug "devices" sub-command. * Show all UEFI devices and their information. */ -static int do_efi_show_devices(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_devices(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_handle_t *handles; efi_uintn_t num, i; @@ -139,8 +139,8 @@ static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name, * Implement efidebug "drivers" sub-command. * Show all UEFI drivers and their information. */ -static int do_efi_show_drivers(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_drivers(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_handle_t *handles; efi_uintn_t num, i; @@ -311,8 +311,8 @@ static const char *get_guid_text(const void *guid) * Show all UEFI handles and their information, currently all protocols * added to handle. */ -static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_handle_t *handles; efi_guid_t **guid; @@ -371,8 +371,8 @@ static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag, * Implement efidebug "images" sub-command. * Show all UEFI loaded images and their information. */ -static int do_efi_show_images(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_images(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_print_image_infos(NULL); @@ -453,8 +453,8 @@ static void print_memory_attributes(u64 attributes) * Implement efidebug "memmap" sub-command. * Show UEFI memory map. */ -static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { struct efi_mem_desc *memmap = NULL, *map; efi_uintn_t map_size = 0; @@ -521,8 +521,8 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag, * Implement efidebug "tables" sub-command. * Show UEFI configuration tables. */ -static int do_efi_show_tables(cmd_tbl_t *cmdtp, int flag, - int argc, char * const argv[]) +static int do_efi_show_tables(struct cmd_tbl *cmdtp, int flag, + int argc, char *const argv[]) { efi_uintn_t i; const char *guid_str; @@ -551,8 +551,8 @@ static int do_efi_show_tables(cmd_tbl_t *cmdtp, int flag, * * efidebug boot add