public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol
@ 2013-09-03 21:04 Yann E. MORIN
  2013-09-03 21:04 ` [PATCH 2/3] kconfig: regenerate bison parser Yann E. MORIN
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Yann E. MORIN @ 2013-09-03 21:04 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Michal Marek, linux-kernel, Yann E. MORIN, Sam Ravnborg

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Currently, the 'MODULES' symbol is hard-coded to be the default symbol
that enables/disables tristates, if no other symbol was declared with
'option modules'.

While this used to be needed for the Linux kernel, we now have an
explicit 'option modules' attached to the 'MODULES' symbol (since
cset 11097a036), so we no longer need to special-case it in the
kconfig code.

Furthermore, kconfig is extensively used out of the Linux kernel, and
other projects may have another meaning for a symbol named 'MODULES'.

This patch changes the way we enable/disable tristates: if a symbol was
found with 'option modules' attached to it, then that symbol controls
enabling tristates. Otherwise, tristates are disabled, even if a symbol
named 'MODULES' exists.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
---
 scripts/kconfig/menu.c  |  5 +----
 scripts/kconfig/zconf.y | 11 ++---------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 7e233a6..3a9c674 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -197,12 +197,9 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep)
 
 void menu_add_option(int token, char *arg)
 {
-	struct property *prop;
-
 	switch (token) {
 	case T_OPT_MODULES:
-		prop = prop_alloc(P_DEFAULT, modules_sym);
-		prop->expr = expr_alloc_symbol(current_entry->sym);
+		modules_sym = current_entry->sym;
 		break;
 	case T_OPT_DEFCONFIG_LIST:
 		if (!sym_defconfig_list)
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 864da07..0653886 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -493,9 +493,6 @@ void conf_parse(const char *name)
 
 	sym_init();
 	_menu_init();
-	modules_sym = sym_lookup(NULL, 0);
-	modules_sym->type = S_BOOLEAN;
-	modules_sym->flags |= SYMBOL_AUTO;
 	rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
 
 	if (getenv("ZCONF_DEBUG"))
@@ -503,12 +500,8 @@ void conf_parse(const char *name)
 	zconfparse();
 	if (zconfnerrs)
 		exit(1);
-	if (!modules_sym->prop) {
-		struct property *prop;
-
-		prop = prop_alloc(P_DEFAULT, modules_sym);
-		prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
-	}
+	if (!modules_sym)
+		modules_sym = sym_find( "n" );
 
 	rootmenu.prompt->text = _(rootmenu.prompt->text);
 	rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [pull request] Pull request for branch yem/kconfig-for-next
@ 2013-09-04 10:59 Yann E. MORIN
  2013-09-04 10:59 ` [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2013-09-04 10:59 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Michal Marek, linux-kernel, Sam Ravnborg, Yann E. MORIN

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Hello All!

Michal, please pull for 3.12 this series that removes special-casing of
the 'MODULES' symbol, as previously discussed with Sam and you.

Regards,
Yann E. MORIN.


The following changes since commit b020bae0467b490797d61e6a658fb7df4568c074:

  Merge branch 'kbuild/kconfig' into kbuild/for-next (2013-09-01 21:25:45 +0200)

are available in the git repository at:


  git://gitorious.org/linux-kconfig/linux-kconfig.git yem/kconfig-for-next

for you to fetch changes up to 2c15d81f712791d3eae9a15414c83780a8dd6ac1:

  kconfig: do not allow more than one symbol to have 'option modules' (2013-09-04 12:57:48 +0200)

----------------------------------------------------------------
Yann E. MORIN (3):
      kconfig: do not special-case 'MODULES' symbol
      kconfig: regenerate bison parser
      kconfig: do not allow more than one symbol to have 'option modules'

 Documentation/kbuild/kconfig-language.txt |   1 +
 scripts/kconfig/menu.c                    |  11 +-
 scripts/kconfig/zconf.tab.c_shipped       | 562 ++++++++++++++++--------------
 scripts/kconfig/zconf.y                   |  11 +-
 4 files changed, 308 insertions(+), 277 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2013-09-06 10:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 21:04 [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol Yann E. MORIN
2013-09-03 21:04 ` [PATCH 2/3] kconfig: regenerate bison parser Yann E. MORIN
2013-09-03 21:04 ` [PATCH 3/3] kconfig: do not allow more than one symbol to have 'option modules' Yann E. MORIN
2013-09-03 21:12 ` [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol Yann E. MORIN
2013-09-04  8:22   ` Michal Marek
2013-09-05  9:38 ` Michal Marek
2013-09-05 10:02   ` Michal Marek
2013-09-06  9:48     ` Yann E. MORIN
2013-09-06  9:47   ` Yann E. MORIN
2013-09-06 10:02     ` Michal Marek
  -- strict thread matches above, loose matches on Subject: below --
2013-09-04 10:59 [pull request] Pull request for branch yem/kconfig-for-next Yann E. MORIN
2013-09-04 10:59 ` [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox