Skip to contentSkip to conversation

usb: ulpi: kconfig: Remove meaningless choice default

PATCH In review Ulf Magnusson 2 participants 2 messages Jan 30, 2018 – Feb 6, 2018 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: ulpi: kconfig: Remove meaningless choice default

'default' on a choice refers to the symbol selected by default, not to the choice mode, so 'default n' is meaningless.

No functional changes. Optional choices implicitly default to n mode (and there is no way to make them default to another mode).

Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib),
which prints the following warning:

warning: the default selection n (undefined) of <choice> (defined at drivers/usb/ulpi/Kconfig:3) is not contained in the choice

I've added a corresponding warning to the C tools too, which is currently in linux-next: https://patchwork.kernel.org/patch/9983667/

---
 drivers/usb/ulpi/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/usb/ulpi/Kconfig +0 -1
index 329d2df3ed..001564d40c 100644
@@ -3,7 +3,6 @@ comment "ULPI drivers"
 choice
 	prompt "ULPI Viewport type"
 	optional
-	default n
 	help
 	  Select ULPI viewport (SoC-side interface to ULPI) implementation
 	  appropriate for the device if you want to communicate with
Signature · 1 line
2.14.1
#1 lore raw
Quoted 9 lines · Ulf Magnusson

'default' on a choice refers to the symbol selected by default, not to the choice mode, so 'default n' is meaningless.

No functional changes. Optional choices implicitly default to n mode (and there is no way to make them default to another mode).

Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib),
which prints the following warning:

Quoted 6 lines

warning: the default selection n (undefined) of <choice> (defined at drivers/usb/ulpi/Kconfig:3) is not contained in the choice

I've added a corresponding warning to the C tools too, which is currently in linux-next: https://patchwork.kernel.org/patch/9983667/

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180205/8609813a/attachment.sig>