All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig-language: improve menuconfig usage description
@ 2016-08-02 22:40 Eugeniu Rosca
  2016-08-18 21:25 ` Jonathan Corbet
  0 siblings, 1 reply; 3+ messages in thread
From: Eugeniu Rosca @ 2016-08-02 22:40 UTC (permalink / raw)
  To: yann.morin.1998, mmarek, corbet, linux-kbuild, linux-doc; +Cc: rosca.eugeniu

Improper menuconfig usage leads to empty menu entries.
zconfdump() is able to reveal some real-life examples:
- menuconfig VFIO_NOIOMMU
- menuconfig RESET_CONTROLLER
- menuconfig SND_ARM

To avoid future occurrences of those, improve the menuconfig syntax
description.

Signed-off-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
---
 Documentation/kbuild/kconfig-language.txt | 39 ++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt
index db10185..069fcb3 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -274,7 +274,44 @@ menuconfig:
 
 This is similar to the simple config entry above, but it also gives a
 hint to front ends, that all suboptions should be displayed as a
-separate list of options.
+separate list of options. To make sure all the suboptions will really
+show up under the menuconfig entry and not outside of it, every item
+from the <config options> list must depend on the menuconfig symbol.
+In practice, this is achieved by using one of the next two constructs:
+
+(1):
+menuconfig M
+if M
+    config C1
+    config C2
+endif
+
+(2):
+menuconfig M
+config C1
+    depends on M
+config C2
+    depends on M
+
+In the following examples (3) and (4), C1 and C2 still have the M
+dependency, but will not appear under menuconfig M anymore, because
+of C0, which doesn't depend on M:
+
+(3):
+menuconfig M
+    config C0
+if M
+    config C1
+    config C2
+endif
+
+(4):
+menuconfig M
+config C0
+config C1
+    depends on M
+config C2
+    depends on M
 
 choices:
 
-- 
2.9.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kconfig-language: improve menuconfig usage description
  2016-08-02 22:40 [PATCH] kconfig-language: improve menuconfig usage description Eugeniu Rosca
@ 2016-08-18 21:25 ` Jonathan Corbet
  2016-08-19 19:51   ` Eugeniu Rosca
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2016-08-18 21:25 UTC (permalink / raw)
  To: Eugeniu Rosca
  Cc: yann.morin.1998, mmarek, linux-kbuild, linux-doc, rosca.eugeniu

On Wed, 3 Aug 2016 00:40:34 +0200
Eugeniu Rosca <roscaeugeniu@gmail.com> wrote:

> Improper menuconfig usage leads to empty menu entries.
> zconfdump() is able to reveal some real-life examples:
> - menuconfig VFIO_NOIOMMU
> - menuconfig RESET_CONTROLLER
> - menuconfig SND_ARM
> 
> To avoid future occurrences of those, improve the menuconfig syntax
> description.

I've applied this to the docs tree, thanks.

Hopefully you sent patches to fix up the broken menus? :)

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kconfig-language: improve menuconfig usage description
  2016-08-18 21:25 ` Jonathan Corbet
@ 2016-08-19 19:51   ` Eugeniu Rosca
  0 siblings, 0 replies; 3+ messages in thread
From: Eugeniu Rosca @ 2016-08-19 19:51 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Eugeniu Rosca, yann.morin.1998, mmarek, linux-kbuild, linux-doc

On Thu, Aug 18, 2016 at 03:25:24PM -0600, Jonathan Corbet wrote:
> Hopefully you sent patches to fix up the broken menus? :)

Hi Jonathan,

Thanks for the merge.

At least two related fixes have been recently mainlined:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=998cd4637f698b04a464f0fbb25e814651979135
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e30129aed45bc78dc80aed62d8eb44c32d89908a

Best regards,
Eugeniu.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-19 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 22:40 [PATCH] kconfig-language: improve menuconfig usage description Eugeniu Rosca
2016-08-18 21:25 ` Jonathan Corbet
2016-08-19 19:51   ` Eugeniu Rosca

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.