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

2007-01-01 Thread Roman Zippel
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.0 +0100
+++ linux-2.6/scripts/kconfig/zconf.tab.c_shipped	2007-01-01 19:55:16.0 +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.0 +0100
+++ linux-2.6/scripts/kconfig/zconf.y	2007-01-01 19:53:57.0 +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());
 };
 


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

2007-01-01 Thread Roman Zippel
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.0 +0100
+++ linux-2.6/scripts/kconfig/zconf.tab.c_shipped	2007-01-01 19:55:16.0 +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.0 +0100
+++ linux-2.6/scripts/kconfig/zconf.y	2007-01-01 19:53:57.0 +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());
 };
 


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

2006-12-28 Thread Adrian Bunk
On Tue, Dec 19, 2006 at 06:53:22PM +0100, Roman Zippel wrote:
> Hi,
> 
> On Mon, 18 Dec 2006, Adrian Bunk wrote:
> 
> > On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
> > > 
> > >   Remove the note in the documentation that suggests people can use
> > > "requires" for dependencies in Kconfig files.
> > >...
> > 
> > Considering that noone uses it, what about the patch below to also 
> > remove the implementation?
> 
> Mostly to keep the noise in the generated files low I prefer to just add 
> some warning prints and I'll remove them later with some other syntax 
> changes. This would also give external trees the chance to fix any 
> possible usage first.

How to add some warning prints?

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...

Regarding external trees:
Do you know about anyone actually using it?
The fact that we have zero usages in the kernel and that it doesn't have 
any additional functionality seems to be a strong hint noone knows about 
it. And if anyone really uses it, the fix is so trivial...

> bye, Roman

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-28 Thread Adrian Bunk
On Tue, Dec 19, 2006 at 06:53:22PM +0100, Roman Zippel wrote:
 Hi,
 
 On Mon, 18 Dec 2006, Adrian Bunk wrote:
 
  On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
   
 Remove the note in the documentation that suggests people can use
   requires for dependencies in Kconfig files.
  ...
  
  Considering that noone uses it, what about the patch below to also 
  remove the implementation?
 
 Mostly to keep the noise in the generated files low I prefer to just add 
 some warning prints and I'll remove them later with some other syntax 
 changes. This would also give external trees the chance to fix any 
 possible usage first.

How to add some warning prints?

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...

Regarding external trees:
Do you know about anyone actually using it?
The fact that we have zero usages in the kernel and that it doesn't have 
any additional functionality seems to be a strong hint noone knows about 
it. And if anyone really uses it, the fix is so trivial...

 bye, Roman

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

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-19 Thread Roman Zippel
Hi,

On Mon, 18 Dec 2006, Adrian Bunk wrote:

> On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
> > 
> >   Remove the note in the documentation that suggests people can use
> > "requires" for dependencies in Kconfig files.
> >...
> 
> Considering that noone uses it, what about the patch below to also 
> remove the implementation?

Mostly to keep the noise in the generated files low I prefer to just add 
some warning prints and I'll remove them later with some other syntax 
changes. This would also give external trees the chance to fix any 
possible usage first.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-19 Thread Roman Zippel
Hi,

On Mon, 18 Dec 2006, Adrian Bunk wrote:

 On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
  
Remove the note in the documentation that suggests people can use
  requires for dependencies in Kconfig files.
 ...
 
 Considering that noone uses it, what about the patch below to also 
 remove the implementation?

Mostly to keep the noise in the generated files low I prefer to just add 
some warning prints and I'll remove them later with some other syntax 
changes. This would also give external trees the chance to fix any 
possible usage first.

bye, Roman
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-18 Thread Robert P. J. Day
On Mon, 18 Dec 2006, Adrian Bunk wrote:

> On Mon, Dec 18, 2006 at 01:46:27PM -0500, Robert P. J. Day wrote:

> > p.s.  i didn't look closely enough to see if your patch took out
> > support for both "depends" *and* "requires".  at this point,
> > neither of those are necessary anymore -- it's all "depends on"
> > except for three remaining Kconfig files.
>
> It takes out only "requires" (as the patch description says).

which makes perfect sense, of course.

> Whether to remove the plain "depends" (opposed to "depends on") is a
> different (and perhaps more controversial) question, but it should
> anyway not happen before the last usage is removed.

agreed on that last point.  my patch submission to change "depends" to
"depends on" globally *did* get applied recently:


commit 775ba7ad491a154f99871fe603f03366e84ae159
Merge: d940505... 18b36c7...
Author: Linus Torvalds <[EMAIL PROTECTED]>
Date:   Tue Dec 12 18:51:51 2006 -0800

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial

* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  ...
  kconfig: Standardize "depends" -> "depends on" in Kconfig files
  ...

so it's clear that that transformation was approved.  now we just wait
for the patch to deal with the last three files to go through and
we're all set.

$ grep "depends" $(find . -name Kconfig) | grep -v "depends on"
./arch/arm/mm/Kconfig:  depends !MMU && CPU_CP15 && !CPU_ARM740T
./arch/arm/Kconfig: depends CPU_XSCALE || CPU_XSC3
./arch/v850/Kconfig:  depends !V850E2_SIM85E2C


rday
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-18 Thread Adrian Bunk
On Mon, Dec 18, 2006 at 01:46:27PM -0500, Robert P. J. Day wrote:
> On Mon, 18 Dec 2006, Adrian Bunk wrote:
> 
> > On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
> > >
> > >   Remove the note in the documentation that suggests people can use
> > > "requires" for dependencies in Kconfig files.
> > >...
> >
> > Considering that noone uses it, what about the patch below to also
> > remove the implementation?
> 
> ... big snip ...
> 
> i have no problem knocking out of the parser anything related to
> "depends" or "requires."  in fact, i did note in earlier patch
> submissions that i was just cleaning the Kconfig files but i was
> leaving the parser alone, and someone else was welcome to take care of
> that.
> 
> if the kbuild folks are good with this, i certainly have no objection.
> 
> rday
> 
> p.s.  i didn't look closely enough to see if your patch took out
> support for both "depends" *and* "requires".  at this point, neither
> of those are necessary anymore -- it's all "depends on" except for
> three remaining Kconfig files.

It takes out only "requires" (as the patch description says).

Whether to remove the plain "depends" (opposed to "depends on") is a 
different (and perhaps more controversial) question, but it should 
anyway not happen before the last usage is removed.

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-18 Thread Robert P. J. Day
On Mon, 18 Dec 2006, Adrian Bunk wrote:

> On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
> >
> >   Remove the note in the documentation that suggests people can use
> > "requires" for dependencies in Kconfig files.
> >...
>
> Considering that noone uses it, what about the patch below to also
> remove the implementation?

... big snip ...

i have no problem knocking out of the parser anything related to
"depends" or "requires."  in fact, i did note in earlier patch
submissions that i was just cleaning the Kconfig files but i was
leaving the parser alone, and someone else was welcome to take care of
that.

if the kbuild folks are good with this, i certainly have no objection.

rday

p.s.  i didn't look closely enough to see if your patch took out
support for both "depends" *and* "requires".  at this point, neither
of those are necessary anymore -- it's all "depends on" except for
three remaining Kconfig files.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-18 Thread Robert P. J. Day
On Mon, 18 Dec 2006, Adrian Bunk wrote:

 On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
 
Remove the note in the documentation that suggests people can use
  requires for dependencies in Kconfig files.
 ...

 Considering that noone uses it, what about the patch below to also
 remove the implementation?

... big snip ...

i have no problem knocking out of the parser anything related to
depends or requires.  in fact, i did note in earlier patch
submissions that i was just cleaning the Kconfig files but i was
leaving the parser alone, and someone else was welcome to take care of
that.

if the kbuild folks are good with this, i certainly have no objection.

rday

p.s.  i didn't look closely enough to see if your patch took out
support for both depends *and* requires.  at this point, neither
of those are necessary anymore -- it's all depends on except for
three remaining Kconfig files.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-18 Thread Adrian Bunk
On Mon, Dec 18, 2006 at 01:46:27PM -0500, Robert P. J. Day wrote:
 On Mon, 18 Dec 2006, Adrian Bunk wrote:
 
  On Mon, Dec 18, 2006 at 11:41:59AM -0500, Robert P. J. Day wrote:
  
 Remove the note in the documentation that suggests people can use
   requires for dependencies in Kconfig files.
  ...
 
  Considering that noone uses it, what about the patch below to also
  remove the implementation?
 
 ... big snip ...
 
 i have no problem knocking out of the parser anything related to
 depends or requires.  in fact, i did note in earlier patch
 submissions that i was just cleaning the Kconfig files but i was
 leaving the parser alone, and someone else was welcome to take care of
 that.
 
 if the kbuild folks are good with this, i certainly have no objection.
 
 rday
 
 p.s.  i didn't look closely enough to see if your patch took out
 support for both depends *and* requires.  at this point, neither
 of those are necessary anymore -- it's all depends on except for
 three remaining Kconfig files.

It takes out only requires (as the patch description says).

Whether to remove the plain depends (opposed to depends on) is a 
different (and perhaps more controversial) question, but it should 
anyway not happen before the last usage is removed.

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

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2006-12-18 Thread Robert P. J. Day
On Mon, 18 Dec 2006, Adrian Bunk wrote:

 On Mon, Dec 18, 2006 at 01:46:27PM -0500, Robert P. J. Day wrote:

  p.s.  i didn't look closely enough to see if your patch took out
  support for both depends *and* requires.  at this point,
  neither of those are necessary anymore -- it's all depends on
  except for three remaining Kconfig files.

 It takes out only requires (as the patch description says).

which makes perfect sense, of course.

 Whether to remove the plain depends (opposed to depends on) is a
 different (and perhaps more controversial) question, but it should
 anyway not happen before the last usage is removed.

agreed on that last point.  my patch submission to change depends to
depends on globally *did* get applied recently:


commit 775ba7ad491a154f99871fe603f03366e84ae159
Merge: d940505... 18b36c7...
Author: Linus Torvalds [EMAIL PROTECTED]
Date:   Tue Dec 12 18:51:51 2006 -0800

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial

* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  ...
  kconfig: Standardize depends - depends on in Kconfig files
  ...

so it's clear that that transformation was approved.  now we just wait
for the patch to deal with the last three files to go through and
we're all set.

$ grep depends $(find . -name Kconfig) | grep -v depends on
./arch/arm/mm/Kconfig:  depends !MMU  CPU_CP15  !CPU_ARM740T
./arch/arm/Kconfig: depends CPU_XSCALE || CPU_XSC3
./arch/v850/Kconfig:  depends !V850E2_SIM85E2C


rday
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/