Re: [2.6 patch] kconfig: remove the unused "requires" syntax

From: Roman Zippel
Date: Mon Jan 01 2007 - 14:27:37 EST


Hi,

On Thursday 28 December 2006 22:05, Adrian Bunk wrote:

> How to add some warning prints?

Simple, see the attached patch.

> And what's the problem with changing the generated files?
> There doesn't seem to be much activity in this area, and the noise of
> changing the generated files doesn't seem to be a problem for me (except
> if anyone else is semnding patches for the same area at the same time.
> It's not as if this noise was big compared to the diff between two Linux
> releases...

The additional syntax doesn't hurt anyone, thus I prefer the simpler change.

> Regarding external trees:
> Do you know about anyone actually using it?

No and that's not the point, there is simply no need to change the syntax this
drastically. Just printing a warning is sufficient, which actually tells the
user more specifically what to change, instead of an anonymous syntax error.

bye, Roman
---
scripts/kconfig/zconf.tab.c_shipped | 2 ++
scripts/kconfig/zconf.y | 2 ++
2 files changed, 4 insertions(+)

Index: linux-2.6/scripts/kconfig/zconf.tab.c_shipped
===================================================================
--- linux-2.6.orig/scripts/kconfig/zconf.tab.c_shipped 2007-01-01 19:54:14.000000000 +0100
+++ linux-2.6/scripts/kconfig/zconf.tab.c_shipped 2007-01-01 19:55:16.000000000 +0100
@@ -1738,6 +1738,7 @@ yyreduce:

{
menu_add_dep((yyvsp[-1].expr));
+ zconfprint("warning: 'depends' used without 'on' keyword");
printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
;}
break;
@@ -1746,6 +1747,7 @@ yyreduce:

{
menu_add_dep((yyvsp[-1].expr));
+ zconfprint("warning: 'requires' keyword is deprecated");
printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
;}
break;
Index: linux-2.6/scripts/kconfig/zconf.y
===================================================================
--- linux-2.6.orig/scripts/kconfig/zconf.y 2007-01-01 19:52:20.000000000 +0100
+++ linux-2.6/scripts/kconfig/zconf.y 2007-01-01 19:53:57.000000000 +0100
@@ -422,11 +422,13 @@ depends: T_DEPENDS T_ON expr T_EOL
| T_DEPENDS expr T_EOL
{
menu_add_dep($2);
+ zconfprint("warning: 'depends' used without 'on' keyword");
printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
}
| T_REQUIRES expr T_EOL
{
menu_add_dep($2);
+ zconfprint("warning: 'requires' keyword is deprecated");
printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
};