]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
log: Use CONFIG_IS_ENABLED() for LOG_TEST
authorSean Anderson <seanga2@gmail.com>
Tue, 27 Oct 2020 23:55:23 +0000 (19:55 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 30 Oct 2020 14:55:26 +0000 (10:55 -0400)
Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/log.c

index 6afe6ead251b817a9915aac2382c1d0b79d620d1..16a6ef7539d67b56d34dec0a76166d032259134a 100644 (file)
--- a/cmd/log.c
+++ b/cmd/log.c
@@ -105,7 +105,7 @@ static int do_log_rec(struct cmd_tbl *cmdtp, int flag, int argc,
 
 static struct cmd_tbl log_sub[] = {
        U_BOOT_CMD_MKENT(level, CONFIG_SYS_MAXARGS, 1, do_log_level, "", ""),
-#ifdef CONFIG_LOG_TEST
+#if CONFIG_IS_ENABLED(LOG_TEST)
        U_BOOT_CMD_MKENT(test, 2, 1, do_log_test, "", ""),
 #endif
        U_BOOT_CMD_MKENT(format, CONFIG_SYS_MAXARGS, 1, do_log_format, "", ""),
@@ -133,7 +133,7 @@ static int do_log(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 #ifdef CONFIG_SYS_LONGHELP
 static char log_help_text[] =
        "level - get/set log level\n"
-#ifdef CONFIG_LOG_TEST
+#if CONFIG_IS_ENABLED(LOG_TEST)
        "log test - run log tests\n"
 #endif
        "log format <fmt> - set log output format. <fmt> is a string where\n"