This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 5509f8f4ba arch/x86: Fix the Kconfig warning
5509f8f4ba is described below

commit 5509f8f4bacbd4de1a58f1c83e146423abb971b8
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
AuthorDate: Mon Jun 6 23:51:48 2022 +0800

    arch/x86: Fix the Kconfig warning
    
    arch/x86/Kconfig:28:warning: choice value used outside its choice group
    arch/x86/Kconfig:29:warning: defaults for choice values not supported
    
    Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com>
---
 arch/x86/Kconfig                                   | 20 ++++++++++----------
 arch/x86/src/qemu/Kconfig                          |  2 +-
 arch/x86/src/qemu/chip.h                           |  4 ++--
 boards/Kconfig                                     |  2 +-
 boards/x86/qemu/qemu-i486/configs/nsh/defconfig    |  2 +-
 boards/x86/qemu/qemu-i486/configs/ostest/defconfig |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 879d90155e..2fe8df2d7d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -8,11 +8,11 @@ comment "x86 Configuration Options"
 
 choice
        prompt "x86 chip selection"
-       default ARCH_I486
+       default ARCH_CHIP_QEMU_I486
 
-config ARCH_I486
-       bool "i486"
-       select ARCH_X86_HAVE_32BIT
+config ARCH_CHIP_QEMU_I486
+       bool "Qemu x86 emulation"
+       select ARCH_I486
        ---help---
                Intel i486 architecture
 
@@ -24,15 +24,15 @@ config ARCH_CHIP_X86_CUSTOM
 
 endchoice
 
-config ARCH_CHIP_QEMU
-       bool "Qemu x86 emulation"
-       default n
+config ARCH_I486
+       bool
+       select ARCH_X86_HAVE_32BIT
        ---help---
                Intel i486 architecture
 
 config ARCH_CHIP
        string
-       default "qemu" if ARCH_CHIP_QEMU
+       default "qemu" if ARCH_CHIP_QEMU_I486
 
 config ARCH_X86_HAVE_32BIT
        bool
@@ -52,7 +52,7 @@ source "arch/x86/src/common/Kconfig"
 if ARCH_I486
 source "arch/x86/src/i486/Kconfig"
 endif # ARCH_I486
-if ARCH_CHIP_QEMU
+if ARCH_CHIP_QEMU_I486
 source "arch/x86/src/qemu/Kconfig"
-endif # ARCH_CHIP_QEMU
+endif # ARCH_CHIP_QEMU_I486
 endif # ARCH_X86
diff --git a/arch/x86/src/qemu/Kconfig b/arch/x86/src/qemu/Kconfig
index 79cd889fbf..b0686f6b17 100644
--- a/arch/x86/src/qemu/Kconfig
+++ b/arch/x86/src/qemu/Kconfig
@@ -3,7 +3,7 @@
 # see the file kconfig-language.txt in the NuttX tools repository.
 #
 
-if ARCH_CHIP_QEMU
+if ARCH_CHIP_QEMU_I486
 comment "QEMU Configuration Options"
 
 config QEMU_KEYPAD
diff --git a/arch/x86/src/qemu/chip.h b/arch/x86/src/qemu/chip.h
index 795aed9748..a7065e0701 100644
--- a/arch/x86/src/qemu/chip.h
+++ b/arch/x86/src/qemu/chip.h
@@ -29,9 +29,9 @@
 
 /* Get customizations for each supported QEMU emulation */
 
-#ifdef CONFIG_ARCH_CHIP_QEMU
+#ifdef CONFIG_ARCH_CHIP_QEMU_I486
 #else
-#  error "Unsupported STM32 chip"
+#  error "Unsupported I486 chip"
 #endif
 
 /* Include only the memory map.  Other chip hardware files should then include 
this
diff --git a/boards/Kconfig b/boards/Kconfig
index e4d6580d59..e247b2448c 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -1399,7 +1399,7 @@ config ARCH_BOARD_NUCLEO_L552ZE
 
 config ARCH_BOARD_QEMU_I486
        bool "Qemu i486 Mode"
-       depends on ARCH_X86 || ARCH_I486
+       depends on ARCH_CHIP_QEMU_I486
        ---help---
                Port of NuttX to QEMU in i486 mode.  This port will also run on 
real i486
                hardware (Google the Bifferboard).
diff --git a/boards/x86/qemu/qemu-i486/configs/nsh/defconfig 
b/boards/x86/qemu/qemu-i486/configs/nsh/defconfig
index 1ab06feaaf..b26bb84641 100644
--- a/boards/x86/qemu/qemu-i486/configs/nsh/defconfig
+++ b/boards/x86/qemu/qemu-i486/configs/nsh/defconfig
@@ -18,7 +18,7 @@ CONFIG_ARCH="x86"
 CONFIG_ARCH_BOARD="qemu-i486"
 CONFIG_ARCH_BOARD_QEMU_I486=y
 CONFIG_ARCH_CHIP="qemu"
-CONFIG_ARCH_CHIP_QEMU=y
+CONFIG_ARCH_CHIP_QEMU_I486=y
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_ARCH_X86=y
 CONFIG_ARCH_X86_M32=y
diff --git a/boards/x86/qemu/qemu-i486/configs/ostest/defconfig 
b/boards/x86/qemu/qemu-i486/configs/ostest/defconfig
index 5876d7f82a..73f8079141 100644
--- a/boards/x86/qemu/qemu-i486/configs/ostest/defconfig
+++ b/boards/x86/qemu/qemu-i486/configs/ostest/defconfig
@@ -9,7 +9,7 @@ CONFIG_ARCH="x86"
 CONFIG_ARCH_BOARD="qemu-i486"
 CONFIG_ARCH_BOARD_QEMU_I486=y
 CONFIG_ARCH_CHIP="qemu"
-CONFIG_ARCH_CHIP_QEMU=y
+CONFIG_ARCH_CHIP_QEMU_I486=y
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_ARCH_X86=y
 CONFIG_ARCH_X86_M32=y

Reply via email to