Re: [PATCH] kconfig: update kconfig-language text

Previous thread: [PATCH] [TRIVIAL] fix spelling mistake in drivers/usb/host/Kconfig by mbressers on Monday, August 13, 2007 - 11:02 am. (1 message)

Next thread: 2.6.23-rc3 regression and bisection query by Hugh Dickins on Monday, August 13, 2007 - 11:44 am. (6 messages)
From: Randy Dunlap
Date: Monday, August 13, 2007 - 11:38 am

From: Randy Dunlap <randy.dunlap@oracle.com>

Add kconfig-language docs for mainmenu, def_bool[ean],
and def_tristate.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 Documentation/kbuild/kconfig-language.txt |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- linux-2.6.23-rc3.orig/Documentation/kbuild/kconfig-language.txt
+++ linux-2.6.23-rc3/Documentation/kbuild/kconfig-language.txt
@@ -77,6 +77,11 @@ applicable everywhere (see syntax).
   Optionally, dependencies only for this default value can be added with
   "if".
 
+- type definition + default value:
+	"def_bool"/"def_boolean"/"def_tristate" <expr> ["if" <expr>]
+  This is a shorthand notation for a type definition plus a value.
+  Optionally dependencies for this default value can be added with "if".
+
 - dependencies: "depends on"/"requires" <expr>
   This defines a dependency for this menu entry. If multiple
   dependencies are defined, they are connected with '&&'. Dependencies
@@ -289,3 +294,10 @@ source:
 	"source" <prompt>
 
 This reads the specified configuration file. This file is always parsed.
+
+mainmenu:
+
+	"mainmenu" <prompt>
+
+This sets the config program's title bar if the config program chooses
+to use it.
-

From: Adrian Bunk
Date: Monday, August 13, 2007 - 11:54 am

Should the redundant and unused def_boolean be documented or removed?

I'd prefer the latter.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Randy Dunlap
Date: Monday, August 13, 2007 - 12:05 pm

I don't see a problem with it.  At any rate,
I'm documenting the current state of the source code...

Get it removed and this doc can be changed.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

From: Robert P. J. Day
Date: Monday, August 13, 2007 - 12:13 pm

me too.  and, as i've suggested before, it would also be cleaner to
remove the redundant "requires" and almost redundant "depends" from
Kconfig files, and standardize exclusively on "depends on".

at the moment, there are only five Kconfig files that use the far less
common "depends" directive:

./drivers/telephony/Kconfig:    depends ISA || PCI
./drivers/leds/Kconfig: depends LEDS_CLASS && ARCH_H1940
./drivers/input/misc/Kconfig:   depends EXPERIMENTAL
./arch/blackfin/Kconfig:        depends BFIN_DMA_5XX
./arch/powerpc/platforms/Kconfig:       depends PPC_IBM_CELL_BLADE

adjust those and there's no reason to hang on to "depends" any longer.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-

From: Randy Dunlap
Date: Monday, August 13, 2007 - 12:43 pm

but what problem are these?  what is solved by these changes?

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

From: Robert P. J. Day
Date: Monday, August 13, 2007 - 12:44 pm

why support a directive that is almost entirely unused?  sure, it's
not hurting anything, but it also has no value.  what's the point in
continuing to support obvious redundancy in the Kconfig files and the
parser?

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-

From: Adrian Bunk
Date: Monday, August 13, 2007 - 1:05 pm

cu
Adrian


<--  snip  -->


This patch removes the following redundant and never or rarely used 
kconfig syntax:
- "def_boolean" (same as "def_bool")
- "requires" (same as "depends on")
- "depends" (same as "depends on")

Most of the size of this patch comes from regenerating generated files.

---

 arch/blackfin/Kconfig                |    2 
 arch/powerpc/Kconfig.debug           |    6 
 arch/powerpc/platforms/Kconfig       |    2 
 drivers/input/misc/Kconfig           |    2 
 drivers/leds/Kconfig                 |    2 
 drivers/telephony/Kconfig            |    2 
 net/wireless/Kconfig                 |    2 
 scripts/kconfig/lex.zconf.c_shipped  |    4 
 scripts/kconfig/zconf.gperf          |    2 
 scripts/kconfig/zconf.hash.c_shipped |  223 ++--
 scripts/kconfig/zconf.tab.c_shipped  | 1406 ++++++++++++++-------------
 scripts/kconfig/zconf.y              |   11 
 12 files changed, 889 insertions(+), 775 deletions(-)

5f428f723cec2529118c13fce4ea3b966626f108 
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 017defa..c1aec46 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -603,7 +603,7 @@ config BFIN_DMA_5XX
 choice
 	prompt "Uncached SDRAM region"
 	default DMA_UNCACHED_1M
-	depends BFIN_DMA_5XX
+	depends on BFIN_DMA_5XX
 config DMA_UNCACHED_2M
 	bool "Enable 2M DMA region"
 config DMA_UNCACHED_1M
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index ef35560..cb7193f 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -96,7 +96,7 @@ config BDI_SWITCH
 
 config BOOTX_TEXT
 	bool "Support for early boot text console (BootX or OpenFirmware only)"
-	depends PPC_OF && PPC_MULTIPLATFORM
+	depends on PPC_OF && PPC_MULTIPLATFORM
 	help
 	  Say Y here to see progress messages from the boot firmware in text
 	  mode. Requires either BootX or Open Firmware.
@@ -177,12 +177,12 @@ endchoice
 
 config PPC_EARLY_DEBUG_44x_PHYSLOW
 	hex "Low 32 bits of early debug UART ...
From: Randy Dunlap
Date: Monday, August 13, 2007 - 2:17 pm

Looks OK to me.



---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

From: Adrian Bunk
Date: Monday, August 13, 2007 - 2:31 pm

Ups, sorry:


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-

From: Randy Dunlap
Date: Friday, October 19, 2007 - 10:53 am

From: Randy Dunlap <randy.dunlap@oracle.com>

Add kconfig-language docs for mainmenu, def_bool, and def_tristate.
Remove "requires" as a synonym of "depends on" since it was removed
from  the parser in commit 247537b9a270b52cc0375adcb0fb2605a160cba5.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/kbuild/kconfig-language.txt |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

--- linux-2.6.23-git13.orig/Documentation/kbuild/kconfig-language.txt
+++ linux-2.6.23-git13/Documentation/kbuild/kconfig-language.txt
@@ -77,7 +77,12 @@ applicable everywhere (see syntax).
   Optionally, dependencies only for this default value can be added with
   "if".
 
-- dependencies: "depends on"/"requires" <expr>
+- type definition + default value:
+	"def_bool"/"def_tristate" <expr> ["if" <expr>]
+  This is a shorthand notation for a type definition plus a value.
+  Optionally dependencies for this default value can be added with "if".
+
+- dependencies: "depends on" <expr>
   This defines a dependency for this menu entry. If multiple
   dependencies are defined, they are connected with '&&'. Dependencies
   are applied to all other options within this menu entry (which also
@@ -289,3 +294,10 @@ source:
 	"source" <prompt>
 
 This reads the specified configuration file. This file is always parsed.
+
+mainmenu:
+
+	"mainmenu" <prompt>
+
+This sets the config program's title bar if the config program chooses
+to use it.

-

From: Sam Ravnborg
Date: Friday, October 19, 2007 - 12:59 pm

Thanks Randy - applied.

	Sam
-

Previous thread: [PATCH] [TRIVIAL] fix spelling mistake in drivers/usb/host/Kconfig by mbressers on Monday, August 13, 2007 - 11:02 am. (1 me