summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-02-10 09:17:25 -0500
committerTom Rini <[email protected]>2023-02-10 09:17:25 -0500
commit8b301102e246350a0ccedc370f7c9923b02f86f2 (patch)
tree15ddc9d376d630efb4c614c4bda559d3c0c99d64 /cmd
parent81e8a51cee2b265e26272f0c67518c4844baa36c (diff)
parent42a13b21dcb6663847ae71c0a42dcf2f4149b69a (diff)
Merge branch '2023-02-08-Kconfig-cleanup-CONFIG_IS_ENABLED-to-IS_ENABLED'
- This series brings in a large number of patches in the form of changing CONFIG_IS_ENABLED(FOO) to IS_ENABLED(CONFIG_FOO) when there it is the case that CONFIG_xPL_FOO is never a valid symbol. The majority of the times where we do this, it is unintentional and does not make the code more useful, or rarely, introduces bugs.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bootcount.c4
-rw-r--r--cmd/bootmenu.c4
-rw-r--r--cmd/cls.c2
-rw-r--r--cmd/cpu.c2
-rw-r--r--cmd/dm.c2
-rw-r--r--cmd/eficonfig.c2
-rw-r--r--cmd/fastboot.c4
-rw-r--r--cmd/net.c6
-rw-r--r--cmd/nvedit.c2
-rw-r--r--cmd/ti/pd.c2
10 files changed, 15 insertions, 15 deletions
diff --git a/cmd/bootcount.c b/cmd/bootcount.c
index 654bbb805c1..3898d2543d2 100644
--- a/cmd/bootcount.c
+++ b/cmd/bootcount.c
@@ -46,7 +46,7 @@ static int do_bootcount(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_USAGE;
}
-#if CONFIG_IS_ENABLED(SYS_LONGHELP)
+#if IS_ENABLED(CONFIG_SYS_LONGHELP)
static char bootcount_help_text[] =
"print - print current bootcounter\n"
"reset - reset the bootcounter"
@@ -55,7 +55,7 @@ static char bootcount_help_text[] =
U_BOOT_CMD(bootcount, 2, 1, do_bootcount,
"bootcount",
-#if CONFIG_IS_ENABLED(SYS_LONGHELP)
+#if IS_ENABLED(CONFIG_SYS_LONGHELP)
bootcount_help_text
#endif
);
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 3236ca5d799..ef196bd504f 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -223,7 +223,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu,
return 1;
}
-#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
+#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (IS_ENABLED(CONFIG_CMD_EFICONFIG))
/**
* prepare_uefi_bootorder_entry() - generate the uefi bootmenu entries
*
@@ -343,7 +343,7 @@ static struct bootmenu_data *bootmenu_create(int delay)
if (ret < 0)
goto cleanup;
-#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
+#if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR)) && (IS_ENABLED(CONFIG_CMD_EFICONFIG))
if (i < MAX_COUNT - 1) {
efi_status_t efi_ret;
diff --git a/cmd/cls.c b/cmd/cls.c
index 18643ec0243..40a32eeab63 100644
--- a/cmd/cls.c
+++ b/cmd/cls.c
@@ -19,7 +19,7 @@ static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
/* Send clear screen and home */
printf(CSI "2J" CSI "1;1H");
- if (CONFIG_IS_ENABLED(VIDEO) && !CONFIG_IS_ENABLED(VIDEO_ANSI)) {
+ if (IS_ENABLED(CONFIG_VIDEO) && !IS_ENABLED(CONFIG_VIDEO_ANSI)) {
if (uclass_first_device_err(UCLASS_VIDEO, &dev))
return CMD_RET_FAILURE;
if (video_clear(dev))
diff --git a/cmd/cpu.c b/cmd/cpu.c
index a09736e1bb9..314852440f1 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -83,7 +83,7 @@ static int do_cpu_detail(struct cmd_tbl *cmdtp, int flag, int argc,
return 0;
}
-#if CONFIG_IS_ENABLED(SYS_LONGHELP)
+#if IS_ENABLED(CONFIG_SYS_LONGHELP)
static char cpu_help_text[] =
"list - list available CPUs\n"
"cpu detail - show CPU detail"
diff --git a/cmd/dm.c b/cmd/dm.c
index 979cd36061e..3263547cbec 100644
--- a/cmd/dm.c
+++ b/cmd/dm.c
@@ -84,7 +84,7 @@ static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc,
#define DM_MEM
#endif
-#if CONFIG_IS_ENABLED(SYS_LONGHELP)
+#if IS_ENABLED(CONFIG_SYS_LONGHELP)
static char dm_help_text[] =
"compat Dump list of drivers with compatibility strings\n"
"dm devres Dump list of device resources for each device\n"
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
index 47c04cf5363..46f652c35d6 100644
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -2670,7 +2670,7 @@ static const struct eficonfig_item maintenance_menu_items[] = {
{"Edit Boot Option", eficonfig_process_edit_boot_option},
{"Change Boot Order", eficonfig_process_change_boot_order},
{"Delete Boot Option", eficonfig_process_delete_boot_option},
-#if (CONFIG_IS_ENABLED(EFI_SECURE_BOOT) && CONFIG_IS_ENABLED(EFI_MM_COMM_TEE))
+#if (CONFIG_IS_ENABLED(EFI_SECURE_BOOT) && IS_ENABLED(CONFIG_EFI_MM_COMM_TEE))
{"Secure Boot Configuration", eficonfig_process_secure_boot_config},
#endif
{"Quit", eficonfig_process_quit},
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index b94dbd54884..97dc02ce748 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -21,7 +21,7 @@ static int do_fastboot_udp(int argc, char *const argv[],
{
int err;
- if (!CONFIG_IS_ENABLED(UDP_FUNCTION_FASTBOOT)) {
+ if (!IS_ENABLED(CONFIG_UDP_FUNCTION_FASTBOOT)) {
pr_err("Fastboot UDP not enabled\n");
return CMD_RET_FAILURE;
}
@@ -44,7 +44,7 @@ static int do_fastboot_usb(int argc, char *const argv[],
char *endp;
int ret;
- if (!CONFIG_IS_ENABLED(USB_FUNCTION_FASTBOOT)) {
+ if (!IS_ENABLED(CONFIG_USB_FUNCTION_FASTBOOT)) {
pr_err("Fastboot USB not enabled\n");
return CMD_RET_FAILURE;
}
diff --git a/cmd/net.c b/cmd/net.c
index 4227321871c..d5e20843dda 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -280,7 +280,7 @@ static int parse_args(enum proto_t proto, int argc, char *const argv[])
switch (argc) {
case 1:
- if (CONFIG_IS_ENABLED(CMD_TFTPPUT) && proto == TFTPPUT)
+ if (IS_ENABLED(CONFIG_CMD_TFTPPUT) && proto == TFTPPUT)
return 1;
/* refresh bootfile name from env */
@@ -289,7 +289,7 @@ static int parse_args(enum proto_t proto, int argc, char *const argv[])
break;
case 2:
- if (CONFIG_IS_ENABLED(CMD_TFTPPUT) && proto == TFTPPUT)
+ if (IS_ENABLED(CONFIG_CMD_TFTPPUT) && proto == TFTPPUT)
return 1;
/*
* Only one arg - accept two forms:
@@ -311,7 +311,7 @@ static int parse_args(enum proto_t proto, int argc, char *const argv[])
break;
case 3:
- if (CONFIG_IS_ENABLED(CMD_TFTPPUT) && proto == TFTPPUT) {
+ if (IS_ENABLED(CONFIG_CMD_TFTPPUT) && proto == TFTPPUT) {
if (parse_addr_size(argv))
return 1;
} else {
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index e2a5f0089e9..7cbc3fd573a 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -231,7 +231,7 @@ static int _do_env_set(int flag, int argc, char *const argv[], int env_flag)
debug("Initial value for argc=%d\n", argc);
-#if CONFIG_IS_ENABLED(CMD_NVEDIT_EFI)
+#if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_CMD_NVEDIT_EFI)
if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'e')
return do_env_set_efi(NULL, flag, --argc, ++argv);
#endif
diff --git a/cmd/ti/pd.c b/cmd/ti/pd.c
index 008668fd903..a9a182fc386 100644
--- a/cmd/ti/pd.c
+++ b/cmd/ti/pd.c
@@ -177,7 +177,7 @@ static int ti_do_pd(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv
U_BOOT_CMD(pd, 4, 1, ti_do_pd,
"TI power domain control",
-#if CONFIG_IS_ENABLED(SYS_LONGHELP)
+#if IS_ENABLED(CONFIG_SYS_LONGHELP)
"dump - show power domain status\n"
"enable [psc] [lpsc] - enable power domain\n"
"disable [psc] [lpsc] - disable power domain\n"