]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
drivers/ukconsole/ns16550: Fix Kconfig warnings on invalid `choice`
authorMichalis Pappas <michalis@unikraft.io>
Tue, 24 Sep 2024 15:35:19 +0000 (17:35 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Mon, 30 Sep 2024 14:13:08 +0000 (14:13 +0000)
Fix Kconfig warnings on ns16550 for x86_64 caused by choice groups
defined without an associated symbol:

> warning: choice value used outside its choice group

According to [1]:

"
choices:
"choice" [symbol]
<choice options>
<choice block>
"endchoice"
...

If no [symbol] is associated with a choice, then you can not have multiple
definitions of that choice. If a [symbol] is associated to the choice,
then you may define the same choice (ie. with the same entries) in another
place."

[1] https://android.googlesource.com/kernel/common/+/bcmdhd-3.10/Documentation/kbuild/kconfig-language.txt

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Thassilo Schulze <thassilo@thasso.xyz>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
GitHub-Closes: #1503

drivers/ukconsole/ns16550/Config.uk

index a9a5efcad7dc9f1d7419e5537784786c82d08415..4a4f5f0ab24e0b74e2110f7440b5940c0e712e4a 100644 (file)
@@ -28,7 +28,7 @@ menuconfig LIBUKCONSOLE_NS16550_COM1
        select LIBUKCONSOLE_NS16550_COM_AVAIL
 
 if LIBUKCONSOLE_NS16550_COM1
-choice
+choice LIBUKCONSOLE_NS16550_COM1_BAUD
        prompt "COM1 port baud rate"
        default LIBUKCONSOLE_NS16550_COM1_BAUD_115200
 
@@ -51,7 +51,7 @@ menuconfig LIBUKCONSOLE_NS16550_COM2
        select LIBUKCONSOLE_NS16550_COM_AVAIL
 
 if LIBUKCONSOLE_NS16550_COM2
-choice
+choice LIBUKCONSOLE_NS16550_COM2_BAUD
        prompt "COM2 port baud rate"
        default LIBUKCONSOLE_NS16550_COM2_BAUD_115200
 
@@ -74,7 +74,7 @@ menuconfig LIBUKCONSOLE_NS16550_COM3
        select LIBUKCONSOLE_NS16550_COM_AVAIL
 
 if LIBUKCONSOLE_NS16550_COM3
-choice
+choice LIBUKCONSOLE_NS16550_COM3_BAUD
        prompt "COM3 port baud rate"
        default LIBUKCONSOLE_NS16550_COM3_BAUD_115200
 
@@ -97,7 +97,7 @@ menuconfig LIBUKCONSOLE_NS16550_COM4
        select LIBUKCONSOLE_NS16550_COM_AVAIL
 
 if LIBUKCONSOLE_NS16550_COM4
-choice
+choice LIBUKCONSOLE_NS16550_COM4_BAUD
        prompt "COM4 port baud rate"
        default LIBUKCONSOLE_NS16550_COM4_BAUD_115200
 
@@ -120,7 +120,7 @@ config LIBUKCONSOLE_NS16550_EARLY_CONSOLE
        depends on LIBUKCONSOLE_NS16550_COM_AVAIL
 
 if LIBUKCONSOLE_NS16550_EARLY_CONSOLE
-choice
+choice LIBUKCONSOLE_NS16550_EARLY_CONSOLE_DEVICE
        prompt "Early COM device"
        default LIBUKCONSOLE_NS16550_COM4_EARLY if !LIBUKCONSOLE_NS16550_COM1 && !LIBUKCONSOLE_NS16550_COM2 && !LIBUKCONSOLE_NS16550_COM3 && LIBUKCONSOLE_NS16550_COM4
        default LIBUKCONSOLE_NS16550_COM3_EARLY if !LIBUKCONSOLE_NS16550_COM1 && !LIBUKCONSOLE_NS16550_COM2 && LIBUKCONSOLE_NS16550_COM3