platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 4 Feb 2024 08:10:04 +0000 (17:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Mar 2024 21:47:48 +0000 (21:47 +0000)
Currently, there are two entries for CONFIG_GOLDFISH.

In arch/x86/Kconfig:

  config GOLDFISH
          def_bool y
          depends on X86_GOLDFISH

In drivers/platform/goldfish/Kconfig:

  menuconfig GOLDFISH
          bool "Platform support for Goldfish virtual devices"
          depends on HAS_IOMEM && HAS_DMA

While Kconfig allows multiple entries, it generally leads to tricky
code.

Prior to commit bd2f348db503 ("goldfish: refactor goldfish platform
configs"), CONFIG_GOLDFISH was an alias of CONFIG_X86_GOLDFISH.

After the mentioned commit added the second entry with a user prompt,
the former provides the 'default' property that is effective only when
X86_GOLDFISH=y.

Merge them tegether to clarify how it has worked in the past 8 years.

Cc: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240204081004.33871-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/Kconfig
drivers/platform/goldfish/Kconfig

index 5edec175b9bfc92dfac8832fc3600b843407828b..eb6c9f5b3be728e0113afd20614677efd38ff91a 100644 (file)
@@ -471,10 +471,6 @@ config X86_MPPARSE
          For old smp systems that do not have proper acpi support. Newer systems
          (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
 
-config GOLDFISH
-       def_bool y
-       depends on X86_GOLDFISH
-
 config X86_CPU_RESCTRL
        bool "x86 CPU resource control support"
        depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
index f3d09b1631e3e9856f92bbe0bd708d63e0e270d0..03ca5bf19f985024f2928aa00d8b54eb98de0b19 100644 (file)
@@ -2,6 +2,7 @@
 menuconfig GOLDFISH
        bool "Platform support for Goldfish virtual devices"
        depends on HAS_IOMEM && HAS_DMA
+       default X86_GOLDFISH
        help
          Say Y here to get to see options for the Goldfish virtual platform.
          This option alone does not add any kernel code.