Re: [Buildroot] ARC no console output (was Re: [PATCH 1/2] init/console: Use ttynull as a fallback when there is no console)

2021-01-07 Thread Yann E. MORIN
Vineet, All,

On 2021-01-06 15:36 -0800, Vineet Gupta spake thusly:
> On 11/11/20 5:54 AM, Petr Mladek wrote:
[--SNIP--]
> >Make sure that stdin, stdout, stderr, and /dev/console are always
> >available by a fallback to the existing ttynull driver. It has
> >been implemented for exactly this purpose but it was used only
> >when explicitly configured.
> >
> >Signed-off-by: Petr Mladek 
> 
> >--- a/init/main.c
> >+++ b/init/main.c
> >@@ -1470,8 +1470,14 @@ void __init console_on_rootfs(void)
> > struct file *file = filp_open("/dev/console", O_RDWR, 0);
> > if (IS_ERR(file)) {
> >-pr_err("Warning: unable to open an initial console.\n");
> >-return;
> >+pr_err("Warning: unable to open an initial console. Fallback to 
> >ttynull.\n");
> >+register_ttynull_console();
> >+
> >+file = filp_open("/dev/console", O_RDWR, 0);
> >+if (IS_ERR(file)) {
> >+pr_err("Warning: Failed to add ttynull console. No 
> >stdin, stdout, and stderr for the init process!\n");
> >+return;
> >+}
> 
> This breaks ARC booting (no output on console).
> 
> Our Buildroot based setup has dynamic /dev where /dev/console doesn't exist
> statically and there's a primoridla /init shell script which does following
> 
> /bin/mount -t devtmpfs devtmpfs /dev
> exec 0 exec 1>/dev/console
> exec 2>/dev/console
> exec /sbin/init "$@"

I guess you are speaking about the initramfs (cpio) case, right?

We've changed that code last August:

https://git.buildroot.org/buildroot/commit/fs/cpio/init?id=b9026e83f

I.e. if we can't do the redirection, then we don't redirect anything.
The change was done for people who explicitly pass an empty console= on
their kernel command line.

Now, I haven't looked at nulltty yet, and I have (so far) no idea on how
it works. Thanks for the hint, I'll have a look.

> Buildroot has had this way of handling missing /dev/console since 2011 [1]
> and [2].

See also more archaelogy on that topic, referenced in that commit:
https://git.buildroot.org/buildroot/commit/fs/cpio/?id=98a6f1fc02e41

> Please advise what needs to be done to unbork boot.

This has been present since the 2020.08 release, and has been backported
to the maintenance branches:
2020.02.x (LTS) -> f1a83afe2df2a
2020.05.x   -> 797f9e40224c9

> Otherwise this seems
> like a kernel change which breaks user-space and needs to be backed-out (or
> perhaps conditionalize on CONFIG_NULL_TTY. I'm surprised it hasn't been
> reported by any other  embedded folks

I won't speak about whether this is a kernel regression or not, not my
call.

Regards,
Yann E. MORIN.

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


Re: [PATCH] scripts: kconfig: implement a sort method

2017-04-12 Thread Yann E. MORIN
3 DRD Core Support:

Or you just press '3' (the number between parenthesis), and that will
take you directly there.

When you then exit, you're back top the search results.

>   │ │ USB Test and Measurement Class support  
> │ │  
[--SNIP unsorted menu--]
>   │ │< >   USB LCD driver support
> │ │  
> 
> Compare that to the sorted view of this same entry:
> 
>   │ │--- USB support 
> │ │  
[--SNIP sorted menu--]
>   │ │< > Support WUSB Cable Based Association (CBA)  
> │ │ 
> 
> much easier to find, don't you think?

Arguably, the order may also make sense, for example to "group" related
items. So,  should be a toggle, so that it is possible to go back
to the unsorted, original order, IMHO...

> > Any Help text for Sort?  or is it obvious what it does?  (no)
> wait, it's not obvious what "Sort" means?

I guess that what Randy said was that in this context, it is not more
obvious than Load or Save, and they are documented in the help (but it
is not obvious how to get the help).

For example, go on the "General setup" entry, but do not enter the menu.
Now, select Help: you'll get a bit of help on how to use menuconfig.

There, Load and Save are documented, in Alternate Configuration Files.

> > In an 80x25 terminal (window), the < Sort > option wraps around
> > past column 80.
> not what I see here [1]

I see the same as Randy here:

$ stty size
25 80

https://imgur.com/a/ku0sG

> > I haven't looked at the source code (lately), but I think that it
> > would OK to not have the (extra) spaces inside the <...> brackets.
> > I.e., instead of
> >   │< Exit >< Help >< Save >< Load >< 
> > Sort  
> >>
> > just have
> >   │
> >
> > Or the  does not need to be indented as much as it is.
> I changed that for this very reason

Or just always left-align the line, rather than center it?

> > And BTW, Yann made kconfig an orphan today. :(

Yes, I did a very bad job at being the maintainer over the past years,
so I could not really keep it any longer...

Regards,
Yann E. MORIN.

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


Re: [PATCH] scripts: kconfig: implement a sort method

2017-04-12 Thread Yann E. MORIN
Core Support:

Or you just press '3' (the number between parenthesis), and that will
take you directly there.

When you then exit, you're back top the search results.

>   │ │ USB Test and Measurement Class support  
> │ │  
[--SNIP unsorted menu--]
>   │ │< >   USB LCD driver support
> │ │  
> 
> Compare that to the sorted view of this same entry:
> 
>   │ │--- USB support 
> │ │  
[--SNIP sorted menu--]
>   │ │< > Support WUSB Cable Based Association (CBA)  
> │ │ 
> 
> much easier to find, don't you think?

Arguably, the order may also make sense, for example to "group" related
items. So,  should be a toggle, so that it is possible to go back
to the unsorted, original order, IMHO...

> > Any Help text for Sort?  or is it obvious what it does?  (no)
> wait, it's not obvious what "Sort" means?

I guess that what Randy said was that in this context, it is not more
obvious than Load or Save, and they are documented in the help (but it
is not obvious how to get the help).

For example, go on the "General setup" entry, but do not enter the menu.
Now, select Help: you'll get a bit of help on how to use menuconfig.

There, Load and Save are documented, in Alternate Configuration Files.

> > In an 80x25 terminal (window), the < Sort > option wraps around
> > past column 80.
> not what I see here [1]

I see the same as Randy here:

$ stty size
25 80

https://imgur.com/a/ku0sG

> > I haven't looked at the source code (lately), but I think that it
> > would OK to not have the (extra) spaces inside the <...> brackets.
> > I.e., instead of
> >   │< Exit >< Help >< Save >< Load >< 
> > Sort  
> >>
> > just have
> >   │
> >
> > Or the  does not need to be indented as much as it is.
> I changed that for this very reason

Or just always left-align the line, rather than center it?

> > And BTW, Yann made kconfig an orphan today. :(

Yes, I did a very bad job at being the maintainer over the past years,
so I could not really keep it any longer...

Regards,
Yann E. MORIN.

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


[PATCH] MAINTAINERS: relinquish kconfig

2017-04-10 Thread Yann E. MORIN
Since about the time I was actually added in that file, I've been
almost entirely absent, which totally sucks, and there is no excuse
for my behaviour and for not having relinquished this earlier.

My deepest apologies.

Signed-off-by: "Yann E. MORIN" <yann.morin.1...@free.fr>
Cc: Michal Marek <mma...@suse.cz>
Cc: Masahiro Yamada <yamada.masah...@socionext.com>
Cc: Vincent Legoll <vincent.leg...@gmail.com>
Cc: Linus Torvalds <torva...@linux-foundation.org>
---
 MAINTAINERS | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index fdd5350..58899aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7058,10 +7058,8 @@ F:   mm/kasan/
 F: scripts/Makefile.kasan
 
 KCONFIG
-M: "Yann E. MORIN" <yann.morin.1...@free.fr>
 L: linux-kbu...@vger.kernel.org
-T: git git://gitorious.org/linux-kconfig/linux-kconfig
-S: Maintained
+S: Orphan
 F: Documentation/kbuild/kconfig-language.txt
 F: scripts/kconfig/
 
-- 
2.9.3



[PATCH] MAINTAINERS: relinquish kconfig

2017-04-10 Thread Yann E. MORIN
Since about the time I was actually added in that file, I've been
almost entirely absent, which totally sucks, and there is no excuse
for my behaviour and for not having relinquished this earlier.

My deepest apologies.

Signed-off-by: "Yann E. MORIN" 
Cc: Michal Marek 
Cc: Masahiro Yamada 
Cc: Vincent Legoll 
Cc: Linus Torvalds 
---
 MAINTAINERS | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index fdd5350..58899aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7058,10 +7058,8 @@ F:   mm/kasan/
 F: scripts/Makefile.kasan
 
 KCONFIG
-M:     "Yann E. MORIN" 
 L: linux-kbu...@vger.kernel.org
-T: git git://gitorious.org/linux-kconfig/linux-kconfig
-S: Maintained
+S: Orphan
 F: Documentation/kbuild/kconfig-language.txt
 F: scripts/kconfig/
 
-- 
2.9.3



Re: [patch core/stackprotector] stackprotector: Fix build when compiler lacks support

2014-01-01 Thread Yann E. MORIN
Linus, All,

On 2014-01-01 11:33 -0800, Linus Torvalds spake thusly:
> On Wed, Jan 1, 2014 at 3:42 AM, Yann E. MORIN  wrote:
> >
> > On 2013-12-31 16:16 -0800, Linus Torvalds spake thusly:
> >>
> >> What we really really want to do is to have some way to add config
> >> options based on shell scripts and compiler support. That would also
> >> get rid of a lot of Makefile trickery etc.
> >>
> >> Then we could just make CC_STACKPROTECTOR_STRONG depend on
> >> CC_SUPPORTS_STACKPROTECTOR_STRONG or whatever.
> >
> > Sam Ravnborg suggested somethink along those lines back in July:
> > http://marc.info/?l=linux-kbuild=137399785206527=2
> > and a tentative implementation:
> > http://marc.info/?l=linux-kbuild=137409581406434=2
> 
> Ack. Looks good to me. I've wanted this for a long time for other
> reasons, we should finally just do it.
> 
> That said, we should make sure that the shell execution thing gets
> access to $(CC) etc variables that we have in

This requires exporting them from the Makefiles (they are, in Makefile:391
and below).

> > Basically, that would give something like:
> >
> > config CC_SUPPORTS_STACKPROTECTOR_STRONG
> > bool
> > option exec="some/script/to/test-gcc -fstack-protector-strong"
> 
> For the compiler options, it would hopefully be sufficient to just do
> something like
> 
>   config CC_SUPPORTS_STACKPROTECTOR_STRONG
>   bool
>   option exec="$CC -fstack-protector-strong -c empty.c"
> 
> or something like that. No?

This is an implementation detail, but the original patch expected the
result to be 'y' or 'n' (or empty=='n') on stdout. That way, it could
also be used to fill-in config options that are strings, or ints. Hence
the use of a script.

But H. Peter suggested it should only return a boolean, which seems
entirely reasonable, given the purpose of this. In this case, using 'y'
or 'n' from stdout, or 0 or !0 from the exit code are equally easy.

Also, using a single shell script allows to fix/enhance all of those
calls in a single place, and avoids duplicating all the check logic in
every tests (eg. who is going to create empty.c in your example? Clean
up the output file?). And since kconfig is run from the top-level of the
Linux source tree (even for out-of-tree builds), we can safely use a
path relative to that to call our script(s).

I'll wait a bit until the end of the holiday season before I poke Sam
again on this.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch core/stackprotector] stackprotector: Fix build when compiler lacks support

2014-01-01 Thread Yann E. MORIN
Linus, All,

On 2013-12-31 16:16 -0800, Linus Torvalds spake thusly:
> On Mon, Dec 30, 2013 at 4:45 PM, Kees Cook  wrote:
> >
> > NAK. If you have selected CONFIG_CC_STACKPROTECTOR_STRONG, the build
> > the fail hard. Without this, it means you'll end up with kernels that
> > build and show a stackprotector option in their config, which is
> > false.
> 
> What we really really want to do is to have some way to add config
> options based on shell scripts and compiler support. That would also
> get rid of a lot of Makefile trickery etc.
> 
> Then we could just make CC_STACKPROTECTOR_STRONG depend on
> CC_SUPPORTS_STACKPROTECTOR_STRONG or whatever.

Sam Ravnborg suggested somethink along those lines back in July:
http://marc.info/?l=linux-kbuild=137399785206527=2
and a tentative implementation:
http://marc.info/?l=linux-kbuild=137409581406434=2

Basically, that would give something like:

config CC_SUPPORTS_STACKPROTECTOR_STRONG
bool
option exec="some/script/to/test-gcc -fstack-protector-strong"

config CC_STACKPROTECTOR_STRONG
bool "enable stack-protector strong"
depends on CC_SUPPORTS_STACKPROTECTOR_STRONG

Would that be something that match what you suggested above?

Sam, there were some comments on that patch of yours. Do you want to
update it and resubmit it?

And, Happy New Year to All!

Regards,
Yann E. MORIN.

-- 
.-----..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [trivial] scripts: kconfig: Fix trailing whitespace in zconf.lex.c_shipped

2014-01-01 Thread Yann E. MORIN
Masanari, All,

On 2013-12-22 16:36 +0900, Masanari Iida spake thusly:
> This patch fixed "Error: trailing whitespace" found by
> checkpatch.pl in scripts/kconfig/zconf.lex.c_shipped

That file is a generated file, so we don't really care about trailing
spaces in it.

We only really care about trailing spaces in actual source files.

Ditto for your patch 2/2.

Regards,
Yann E. MORIN.

-- 
.-..--.--------.
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [trivial] scripts: kconfig: Fix trailing whitespace in zconf.lex.c_shipped

2014-01-01 Thread Yann E. MORIN
Masanari, All,

On 2013-12-22 16:36 +0900, Masanari Iida spake thusly:
 This patch fixed Error: trailing whitespace found by
 checkpatch.pl in scripts/kconfig/zconf.lex.c_shipped

That file is a generated file, so we don't really care about trailing
spaces in it.

We only really care about trailing spaces in actual source files.

Ditto for your patch 2/2.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch core/stackprotector] stackprotector: Fix build when compiler lacks support

2014-01-01 Thread Yann E. MORIN
Linus, All,

On 2013-12-31 16:16 -0800, Linus Torvalds spake thusly:
 On Mon, Dec 30, 2013 at 4:45 PM, Kees Cook keesc...@chromium.org wrote:
 
  NAK. If you have selected CONFIG_CC_STACKPROTECTOR_STRONG, the build
  the fail hard. Without this, it means you'll end up with kernels that
  build and show a stackprotector option in their config, which is
  false.
 
 What we really really want to do is to have some way to add config
 options based on shell scripts and compiler support. That would also
 get rid of a lot of Makefile trickery etc.
 
 Then we could just make CC_STACKPROTECTOR_STRONG depend on
 CC_SUPPORTS_STACKPROTECTOR_STRONG or whatever.

Sam Ravnborg suggested somethink along those lines back in July:
http://marc.info/?l=linux-kbuildm=137399785206527w=2
and a tentative implementation:
http://marc.info/?l=linux-kbuildm=137409581406434w=2

Basically, that would give something like:

config CC_SUPPORTS_STACKPROTECTOR_STRONG
bool
option exec=some/script/to/test-gcc -fstack-protector-strong

config CC_STACKPROTECTOR_STRONG
bool enable stack-protector strong
depends on CC_SUPPORTS_STACKPROTECTOR_STRONG

Would that be something that match what you suggested above?

Sam, there were some comments on that patch of yours. Do you want to
update it and resubmit it?

And, Happy New Year to All!

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch core/stackprotector] stackprotector: Fix build when compiler lacks support

2014-01-01 Thread Yann E. MORIN
Linus, All,

On 2014-01-01 11:33 -0800, Linus Torvalds spake thusly:
 On Wed, Jan 1, 2014 at 3:42 AM, Yann E. MORIN yann.morin.1...@free.fr wrote:
 
  On 2013-12-31 16:16 -0800, Linus Torvalds spake thusly:
 
  What we really really want to do is to have some way to add config
  options based on shell scripts and compiler support. That would also
  get rid of a lot of Makefile trickery etc.
 
  Then we could just make CC_STACKPROTECTOR_STRONG depend on
  CC_SUPPORTS_STACKPROTECTOR_STRONG or whatever.
 
  Sam Ravnborg suggested somethink along those lines back in July:
  http://marc.info/?l=linux-kbuildm=137399785206527w=2
  and a tentative implementation:
  http://marc.info/?l=linux-kbuildm=137409581406434w=2
 
 Ack. Looks good to me. I've wanted this for a long time for other
 reasons, we should finally just do it.
 
 That said, we should make sure that the shell execution thing gets
 access to $(CC) etc variables that we have in

This requires exporting them from the Makefiles (they are, in Makefile:391
and below).

  Basically, that would give something like:
 
  config CC_SUPPORTS_STACKPROTECTOR_STRONG
  bool
  option exec=some/script/to/test-gcc -fstack-protector-strong
 
 For the compiler options, it would hopefully be sufficient to just do
 something like
 
   config CC_SUPPORTS_STACKPROTECTOR_STRONG
   bool
   option exec=$CC -fstack-protector-strong -c empty.c
 
 or something like that. No?

This is an implementation detail, but the original patch expected the
result to be 'y' or 'n' (or empty=='n') on stdout. That way, it could
also be used to fill-in config options that are strings, or ints. Hence
the use of a script.

But H. Peter suggested it should only return a boolean, which seems
entirely reasonable, given the purpose of this. In this case, using 'y'
or 'n' from stdout, or 0 or !0 from the exit code are equally easy.

Also, using a single shell script allows to fix/enhance all of those
calls in a single place, and avoids duplicating all the check logic in
every tests (eg. who is going to create empty.c in your example? Clean
up the output file?). And since kconfig is run from the top-level of the
Linux source tree (even for out-of-tree builds), we can safely use a
path relative to that to call our script(s).

I'll wait a bit until the end of the holiday season before I poke Sam
again on this.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] scripts/config: allow setting a string which value contains a colon

2013-11-18 Thread Yann E. MORIN
Clément, All,

On 2013-11-17 12:55 +0100, Clement Chauplannaz spake thusly:
> A bug in script `config' prevented from modifying an existing variable's
> value to a string that contains a colon ':'.  The reason behind it is that
> colons are used as a separator in `sed' commands that script `config'
> relies on.
> 
> Escape colons in `sed' commands to allow values containing colons.
> 
> Signed-off-by: Clement Chauplannaz 

Acked-by: "Yann E. MORIN" 

It'll be in my tree soon, as a rc-fix. Thank you.

Regards,
Yann E. MORIN.

> ---
>  scripts/config | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/config b/scripts/config
> index 6804179..4b16260 100755
> --- a/scripts/config
> +++ b/scripts/config
> @@ -78,7 +78,7 @@ txt_append() {
>  
>  txt_subst() {
>   local before="$1"
> - local after="$2"
> + local after="${2//:/\:}"
>   local infile="$3"
>   local tmpfile="$infile.swp"
>  
> -- 
> 1.8.3.2.dirty
> 

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] scripts/config: allow setting a string which value contains a colon

2013-11-18 Thread Yann E. MORIN
Clément, All,

On 2013-11-17 12:55 +0100, Clement Chauplannaz spake thusly:
 A bug in script `config' prevented from modifying an existing variable's
 value to a string that contains a colon ':'.  The reason behind it is that
 colons are used as a separator in `sed' commands that script `config'
 relies on.
 
 Escape colons in `sed' commands to allow values containing colons.
 
 Signed-off-by: Clement Chauplannaz chaup...@gmail.com

Acked-by: Yann E. MORIN yann.morin.1...@free.fr

It'll be in my tree soon, as a rc-fix. Thank you.

Regards,
Yann E. MORIN.

 ---
  scripts/config | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/scripts/config b/scripts/config
 index 6804179..4b16260 100755
 --- a/scripts/config
 +++ b/scripts/config
 @@ -78,7 +78,7 @@ txt_append() {
  
  txt_subst() {
   local before=$1
 - local after=$2
 + local after=${2//:/\:}
   local infile=$3
   local tmpfile=$infile.swp
  
 -- 
 1.8.3.2.dirty
 

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: make oldnoconfig fix?

2013-11-11 Thread Yann E. MORIN
David, All,

On 2013-11-11 10:11 -0800, David Cohen spake thusly:
> Is there a plan to fix 'make oldnoconfig' option?
> I currently have need to it :)
> I've tracked a thread fixing 'make olddefconfig' where 'oldnoconfig'
> option is reported as a known bug, right?

Sorry, I don't understand what your problem is.

Care to explain in details what problem you have:
  - what you start with
  - what you do
  - what you get
  - what you expected

So we can try to reproduce the issue and investigate what is wrong.

Since you mention an existing thread, please add a pointer (URL) to
this thread in the archives (Use: http://marc.info/?l=linux-kbuild ).

Regards,
Yann E. MORIN.

-- 
.-..--.----.
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: make oldnoconfig fix?

2013-11-11 Thread Yann E. MORIN
David, All,

On 2013-11-11 10:11 -0800, David Cohen spake thusly:
 Is there a plan to fix 'make oldnoconfig' option?
 I currently have need to it :)
 I've tracked a thread fixing 'make olddefconfig' where 'oldnoconfig'
 option is reported as a known bug, right?

Sorry, I don't understand what your problem is.

Care to explain in details what problem you have:
  - what you start with
  - what you do
  - what you get
  - what you expected

So we can try to reproduce the issue and investigate what is wrong.

Since you mention an existing thread, please add a pointer (URL) to
this thread in the archives (Use: http://marc.info/?l=linux-kbuild ).

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Makefile: fix out-of-tree builds for multiple targets with 'all'

2013-11-03 Thread Yann E. MORIN
From: "Yann E. MORIN" 

For out-of-tree builds, this use-case fails to build:
$ make clean all

This is because 'all' is filtered-out in the Makefile wrapper, since
the wrapper itself has a 'all' target.

The 'all' target is just the usual naming for the default target in a
Makefile. In fact, the first target is the default one, so we can name
it whatever we want.

Rename the Makefile wrapper 'all' target to avoid name-clashing.

Reported-by: Ryan Barnett 
Signed-off-by: "Yann E. MORIN" 
Cc: Ryan Barnett 

---
Note: this still does not allow 'make menuconfig all', but that is not
even working for in-tree builds either.
---
 scripts/mkmakefile | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 0cc0442..28583bc 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -42,18 +42,18 @@ MAKEARGS += O=\$(if \$(patsubst 
/%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$
 
 MAKEFLAGS += --no-print-directory
 
-.PHONY: all \$(MAKECMDGOALS)
+.PHONY: _all \$(MAKECMDGOALS)
 
-all:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
+all:= \$(filter-out Makefile,\$(MAKECMDGOALS))
 
-all:
+_all:
\$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
-\$(all): all
+\$(all): _all
@:
 
-%/: all
+%/: _all
@:
 EOF
-- 
1.8.1.2

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


[PATCH] Makefile: fix out-of-tree builds for multiple targets with 'all'

2013-11-03 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

For out-of-tree builds, this use-case fails to build:
$ make clean all

This is because 'all' is filtered-out in the Makefile wrapper, since
the wrapper itself has a 'all' target.

The 'all' target is just the usual naming for the default target in a
Makefile. In fact, the first target is the default one, so we can name
it whatever we want.

Rename the Makefile wrapper 'all' target to avoid name-clashing.

Reported-by: Ryan Barnett rjbar...@rockwellcollins.com
Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Ryan Barnett rjbar...@rockwellcollins.com

---
Note: this still does not allow 'make menuconfig all', but that is not
even working for in-tree builds either.
---
 scripts/mkmakefile | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 0cc0442..28583bc 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -42,18 +42,18 @@ MAKEARGS += O=\$(if \$(patsubst 
/%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$
 
 MAKEFLAGS += --no-print-directory
 
-.PHONY: all \$(MAKECMDGOALS)
+.PHONY: _all \$(MAKECMDGOALS)
 
-all:= \$(filter-out all Makefile,\$(MAKECMDGOALS))
+all:= \$(filter-out Makefile,\$(MAKECMDGOALS))
 
-all:
+_all:
\$(Q)\$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
-\$(all): all
+\$(all): _all
@:
 
-%/: all
+%/: _all
@:
 EOF
-- 
1.8.1.2

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


Re: [PATCH] MAINTAINERS: New kconfig maintainer

2013-10-30 Thread Yann E. MORIN
Michal, All,

On 2013-10-30 12:07 +0100, Michal Marek spake thusly:
> Yann has been the de facto maintainer of kconfig for some time. Update
> the KCONFIG entry with his emails address and git tree.
> 
> Cc: "Yann E. MORIN" 
> Signed-off-by: Michal Marek 

Acked-by: "Yann E. MORIN" 

Thank you for the trust you've put in me with this patch! :-)

Shall I take this in my tree, or will you add it to yours?

Regards,
Yann E. MORIN.

> ---
>  MAINTAINERS |5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e61c2e8..d083982 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4723,9 +4723,10 @@ F: Documentation/hwmon/k8temp
>  F:   drivers/hwmon/k8temp.c
>  
>  KCONFIG
> -M:   Michal Marek 
> +M:   "Yann E. MORIN" 
>  L:   linux-kbu...@vger.kernel.org
> -S:   Odd Fixes
> +T:   git://gitorious.org/linux-kconfig/linux-kconfig
> +S:   Maintained
>  F:   Documentation/kbuild/kconfig-language.txt
>  F:   scripts/kconfig/
>  
> -- 
> 1.7.3.1
> 

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] MAINTAINERS: New kconfig maintainer

2013-10-30 Thread Yann E. MORIN
Michal, All,

On 2013-10-30 12:07 +0100, Michal Marek spake thusly:
 Yann has been the de facto maintainer of kconfig for some time. Update
 the KCONFIG entry with his emails address and git tree.
 
 Cc: Yann E. MORIN yann.morin.1...@free.fr
 Signed-off-by: Michal Marek mma...@suse.cz

Acked-by: Yann E. MORIN yann.morin.1...@free.fr

Thank you for the trust you've put in me with this patch! :-)

Shall I take this in my tree, or will you add it to yours?

Regards,
Yann E. MORIN.

 ---
  MAINTAINERS |5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index e61c2e8..d083982 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -4723,9 +4723,10 @@ F: Documentation/hwmon/k8temp
  F:   drivers/hwmon/k8temp.c
  
  KCONFIG
 -M:   Michal Marek mma...@suse.cz
 +M:   Yann E. MORIN yann.morin.1...@free.fr
  L:   linux-kbu...@vger.kernel.org
 -S:   Odd Fixes
 +T:   git://gitorious.org/linux-kconfig/linux-kconfig
 +S:   Maintained
  F:   Documentation/kbuild/kconfig-language.txt
  F:   scripts/kconfig/
  
 -- 
 1.7.3.1
 

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] scripts/checkkconfig.py: find unused Kconfig parameters

2013-10-29 Thread Yann E. MORIN
Michael, All,

On 2013-10-24 07:23 +0200, Michael Opdenacker spake thusly:
> This is the first version of a script to look for
> Kconfig parameters which are still defined but no longer
> used in the kernel source code.
> 
> The script may be extended in the future to perform
> more checks. This explains why a rather generic name was chosen.
> 
> Several issues have already been reported and fixed
> thanks to the use of this script. It is time to share it now!

I'm not much of a Python guy, so I'll gleefully rely on the previous
comments to guide you in your endeavour.

/me is feeling poetical, tonight! ;-)

I however have a suggestion, see below.

> Signed-off-by: Michael Opdenacker 
> ---
>  scripts/checkkconfig.py | 131 
> 
>  1 file changed, 131 insertions(+)
>  create mode 100755 scripts/checkkconfig.py
> 
> diff --git a/scripts/checkkconfig.py b/scripts/checkkconfig.py
> new file mode 100755
> index 000..4155656
> --- /dev/null
> +++ b/scripts/checkkconfig.py
> @@ -0,0 +1,131 @@
[--SNIP--]
> +def count_param(param):
> +
> +global source_file, bad_params_in_file
> +
> +if os.path.isdir('.git'):
> +   # Use git grep when available
> +   count = subprocess.check_output('git grep ' + param + '| grep -v 
> defconfig | wc -l', shell=True)
> +else:
> +   # Fallback to regular grep
> +   count = subprocess.check_output('grep -R ' + param + ' . | grep -v 
> defconfig | wc -l', shell=True)
> +
> +num = int(count.strip())
> +
> +if num == 1:
> +   'WARNING: parameter ' + param + ' is used nowhere'
> +
> +   file=source_file[param]
> +
> +   if bad_params_in_file.has_key(file):
> +  bad_params_in_file[file].append(param)
> +   else:
> +   bad_params_in_file[file]=[param]
> +
> +
> +
> +# Main program
> +
[--SNIP--]
> +for param in has_select.keys():
> +
> +# Progress information... running the script can take hours!

I guess all these grep spawning are what makes it slow.

I wonder if it would not be possible to invert the loop (in pseudo
Python code):

for f in all_interesting_files:
read f in memory
for s in all_symbols:
if symbol is in f:
remove f from all_symbols
break the inner-most loop

This way:
  - you scan the tree only once
  - as soon as a symbol is matched, it is removed, thus decreasing
the amount of checks done in further loops.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] scripts/kconfig/menu.c: warning: jump may be used uninitialized in this function

2013-10-29 Thread Yann E. MORIN
Christian, All,

On 2013-10-27 19:02 -0700, Christian Kujau spake thusly:
> On Sun, 27 Oct 2013 at 18:28, Christian Kujau wrote:
> > While doing "make oldconfig" on 3.12-rc7 with gcc-4.7.2 (Debian), the 
> > following warning is printed:
> > 
> >   HOSTCC  scripts/kconfig/zconf.tab.o
> > In file included from scripts/kconfig/zconf.tab.c:2537:0:
> > /usr/local/src/linux-git/scripts/kconfig/menu.c: In function 
> > ‘get_symbol_str’:
> > /usr/local/src/linux-git/scripts/kconfig/menu.c:586:18: warning: ‘jump’ may 
> > be used uninitialized in this function [-Wmaybe-uninitialized]
> > /usr/local/src/linux-git/scripts/kconfig/menu.c:547:19: note: ‘jump’ was 
> > declared here
> 
> Grrr, only after I sent this message I found this was reported in 
> September already by Madhavan Srinivasan:  https://lkml.org/lkml/2013/9/19/24
> 
> Does anybody know the state of this fix?

The solution was to properly comment that this was a gcc issue, in that 
this is a spurious error, does not appear in previous gcc versions, and
has been fixed in later gcc versions.

Setting 'jump' to NULL may hide reall issues in case the code is changed
in the future, so it is not appropriate a fix. Hence why the previously-
submitted patches were not applied.

I'll take this on me to properly fix this. Thanks for the heads up.

Regards,
Yann E. MORIN.

-- 
.-----..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] scripts/kconfig/menu.c: warning: jump may be used uninitialized in this function

2013-10-29 Thread Yann E. MORIN
Christian, All,

On 2013-10-27 19:02 -0700, Christian Kujau spake thusly:
 On Sun, 27 Oct 2013 at 18:28, Christian Kujau wrote:
  While doing make oldconfig on 3.12-rc7 with gcc-4.7.2 (Debian), the 
  following warning is printed:
  
HOSTCC  scripts/kconfig/zconf.tab.o
  In file included from scripts/kconfig/zconf.tab.c:2537:0:
  /usr/local/src/linux-git/scripts/kconfig/menu.c: In function 
  ‘get_symbol_str’:
  /usr/local/src/linux-git/scripts/kconfig/menu.c:586:18: warning: ‘jump’ may 
  be used uninitialized in this function [-Wmaybe-uninitialized]
  /usr/local/src/linux-git/scripts/kconfig/menu.c:547:19: note: ‘jump’ was 
  declared here
 
 Grrr, only after I sent this message I found this was reported in 
 September already by Madhavan Srinivasan:  https://lkml.org/lkml/2013/9/19/24
 
 Does anybody know the state of this fix?

The solution was to properly comment that this was a gcc issue, in that 
this is a spurious error, does not appear in previous gcc versions, and
has been fixed in later gcc versions.

Setting 'jump' to NULL may hide reall issues in case the code is changed
in the future, so it is not appropriate a fix. Hence why the previously-
submitted patches were not applied.

I'll take this on me to properly fix this. Thanks for the heads up.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] scripts/checkkconfig.py: find unused Kconfig parameters

2013-10-29 Thread Yann E. MORIN
Michael, All,

On 2013-10-24 07:23 +0200, Michael Opdenacker spake thusly:
 This is the first version of a script to look for
 Kconfig parameters which are still defined but no longer
 used in the kernel source code.
 
 The script may be extended in the future to perform
 more checks. This explains why a rather generic name was chosen.
 
 Several issues have already been reported and fixed
 thanks to the use of this script. It is time to share it now!

I'm not much of a Python guy, so I'll gleefully rely on the previous
comments to guide you in your endeavour.

/me is feeling poetical, tonight! ;-)

I however have a suggestion, see below.

 Signed-off-by: Michael Opdenacker michael.opdenac...@free-electrons.com
 ---
  scripts/checkkconfig.py | 131 
 
  1 file changed, 131 insertions(+)
  create mode 100755 scripts/checkkconfig.py
 
 diff --git a/scripts/checkkconfig.py b/scripts/checkkconfig.py
 new file mode 100755
 index 000..4155656
 --- /dev/null
 +++ b/scripts/checkkconfig.py
 @@ -0,0 +1,131 @@
[--SNIP--]
 +def count_param(param):
 +
 +global source_file, bad_params_in_file
 +
 +if os.path.isdir('.git'):
 +   # Use git grep when available
 +   count = subprocess.check_output('git grep ' + param + '| grep -v 
 defconfig | wc -l', shell=True)
 +else:
 +   # Fallback to regular grep
 +   count = subprocess.check_output('grep -R ' + param + ' . | grep -v 
 defconfig | wc -l', shell=True)
 +
 +num = int(count.strip())
 +
 +if num == 1:
 +   'WARNING: parameter ' + param + ' is used nowhere'
 +
 +   file=source_file[param]
 +
 +   if bad_params_in_file.has_key(file):
 +  bad_params_in_file[file].append(param)
 +   else:
 +   bad_params_in_file[file]=[param]
 +
 +
 +
 +# Main program
 +
[--SNIP--]
 +for param in has_select.keys():
 +
 +# Progress information... running the script can take hours!

I guess all these grep spawning are what makes it slow.

I wonder if it would not be possible to invert the loop (in pseudo
Python code):

for f in all_interesting_files:
read f in memory
for s in all_symbols:
if symbol is in f:
remove f from all_symbols
break the inner-most loop

This way:
  - you scan the tree only once
  - as soon as a symbol is matched, it is removed, thus decreasing
the amount of checks done in further loops.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 0/5] kconfig: cleanups, documentation updates, and one bug fix

2013-10-08 Thread Yann E. MORIN
Martin, All,

On 2013-10-03 19:24 +0200, Martin Walch spake thusly:
> In this second attempt, I tried to incorporate all replies I received for the
> first version of this patch set:

Since there have been positive reviews for thie patches in this series,
I'll take it in my tree.

Regards,
Yann E. MORIN.

> PATCH 1: kconfig: add short explanation to SYMBOL_WRITE
>  Ignore this one as long as there is no clear conclusion about the purpose
>  of SYMBOL_WRITE. I only include it, so the patch numbers do not change and
>  there is no "hole" in the patch set.
> 
> PATCH 2: kconfig: fix trivial typos and update mconf documentation
>  In the first place, this corrected only three typos. Now this patch corrects
>  all bad occurrences of "tell" instead of "tells" and fixes several more
>  spelling mistakes. Furthermore some changes that have been made to mconf
>  during the last years are now also updated in the documentation.
> 
> PATCH 3: kconfig: adjust warning message for conflicting types
>  Now explicitely state that the second type is being ignored.
> 
> PATCH 4: kconfig: remove unused definition from scanner
>  No changes since the first version.
> 
> PATCH 5: kconfig: fix bug in search results string: use strlen(gstr->s), not 
> gstr->len
>  As I do not think it is worth to make this a separate patch, I appended
>  this fix for a bug that is only triggered by the search function of mconf.
> 
> Martin Walch (5):
>   kconfig: add short explanation to SYMBOL_WRITE
>   kconfig: fix trivial typos and update mconf documentation
>   kconfig: adjust warning message for conflicting types
>   kconfig: remove unused definition from scanner
>   kconfig: fix bug in search results string: use strlen(gstr->s), not
> gstr->len
> 
>  scripts/kconfig/expr.h   |  2 +-
>  scripts/kconfig/mconf.c  | 60 
> +++-
>  scripts/kconfig/menu.c   | 11 +
>  scripts/kconfig/symbol.c |  2 +-
>  scripts/kconfig/zconf.l  |  1 -
>  5 files changed, 37 insertions(+), 39 deletions(-)
> 
> -- 
> 1.8.1.5
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2 0/5] kconfig: cleanups, documentation updates, and one bug fix

2013-10-08 Thread Yann E. MORIN
Martin, All,

On 2013-10-03 19:24 +0200, Martin Walch spake thusly:
 In this second attempt, I tried to incorporate all replies I received for the
 first version of this patch set:

Since there have been positive reviews for thie patches in this series,
I'll take it in my tree.

Regards,
Yann E. MORIN.

 PATCH 1: kconfig: add short explanation to SYMBOL_WRITE
  Ignore this one as long as there is no clear conclusion about the purpose
  of SYMBOL_WRITE. I only include it, so the patch numbers do not change and
  there is no hole in the patch set.
 
 PATCH 2: kconfig: fix trivial typos and update mconf documentation
  In the first place, this corrected only three typos. Now this patch corrects
  all bad occurrences of tell instead of tells and fixes several more
  spelling mistakes. Furthermore some changes that have been made to mconf
  during the last years are now also updated in the documentation.
 
 PATCH 3: kconfig: adjust warning message for conflicting types
  Now explicitely state that the second type is being ignored.
 
 PATCH 4: kconfig: remove unused definition from scanner
  No changes since the first version.
 
 PATCH 5: kconfig: fix bug in search results string: use strlen(gstr-s), not 
 gstr-len
  As I do not think it is worth to make this a separate patch, I appended
  this fix for a bug that is only triggered by the search function of mconf.
 
 Martin Walch (5):
   kconfig: add short explanation to SYMBOL_WRITE
   kconfig: fix trivial typos and update mconf documentation
   kconfig: adjust warning message for conflicting types
   kconfig: remove unused definition from scanner
   kconfig: fix bug in search results string: use strlen(gstr-s), not
 gstr-len
 
  scripts/kconfig/expr.h   |  2 +-
  scripts/kconfig/mconf.c  | 60 
 +++-
  scripts/kconfig/menu.c   | 11 +
  scripts/kconfig/symbol.c |  2 +-
  scripts/kconfig/zconf.l  |  1 -
  5 files changed, 37 insertions(+), 39 deletions(-)
 
 -- 
 1.8.1.5
 
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-kbuild in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] kconfig: remove unused definition from scanner

2013-10-03 Thread Yann E. MORIN
Martin, All,

On Thursday 03 October 2013 02:30:21 Martin Walch wrote:
> On Wednesday 02 October 2013 08:57:54 Yann E. MORIN wrote:
> > On Wednesday 02 October 2013 08:42:59 Dirk Gouders wrote:
> > > I think you should also regenerate the scanner and add
> > > the new zconf.lex.c_shipped to this patch.
> > 
> > I think sending the re-generated parser as a separate patch helps
> > in reviewing. Ie. I'd prefer a fifth patch.
> > 
> > BTW, regenerating the parser can be done with:
> > make REGENERATE_PARSERS=1 config
> 
> Actually, I regenerated the scanner. However, the results did not change
> after applying the patch, because the definition that the patch removes
> (ws) is not used anywhere. It is only a cleanup.

OK, then please say so in the commit message.

Regards,
Yann E. MORIN.

-- 
.-----.----.--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --==< O_o >==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|  """  conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] kconfig: remove unused definition from scanner

2013-10-03 Thread Yann E. MORIN
Martin, All,

On Thursday 03 October 2013 02:30:21 Martin Walch wrote:
 On Wednesday 02 October 2013 08:57:54 Yann E. MORIN wrote:
  On Wednesday 02 October 2013 08:42:59 Dirk Gouders wrote:
   I think you should also regenerate the scanner and add
   the new zconf.lex.c_shipped to this patch.
  
  I think sending the re-generated parser as a separate patch helps
  in reviewing. Ie. I'd prefer a fifth patch.
  
  BTW, regenerating the parser can be done with:
  make REGENERATE_PARSERS=1 config
 
 Actually, I regenerated the scanner. However, the results did not change
 after applying the patch, because the definition that the patch removes
 (ws) is not used anywhere. It is only a cleanup.

OK, then please say so in the commit message.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --== O_o ==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] kconfig: remove unused definition from scanner

2013-10-02 Thread Yann E. MORIN
Martin, All,

On Wednesday 02 October 2013 08:42:59 Dirk Gouders wrote:
> Martin Walch  writes:
> 
> > From: Martin Walch 
> > Date: Wed, 2 Oct 2013 06:58:46 +0200
> > Subject: [PATCH 4/4] kconfig: remove unused definition from scanner
> >
> > The definition ws [ \n\t] is not used anywhere. Drop it to avoid confusion.
> 
> Hi Martin,
> 
> I think you should also regenerate the scanner and add
> the new zconf.lex.c_shipped to this patch.

I think sending the re-generated parser as a separate patch helps
in reviewing. Ie. I'd prefer a fifth patch.

BTW, regenerating the parser can be done with:
    make REGENERATE_PARSERS=1 config

Regards,
Yann E. MORIN.

> > Signed-off-by: Martin Walch 
> > ---
> >  scripts/kconfig/zconf.l | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
> > index 6555a47..1a9f53e 100644
> > --- a/scripts/kconfig/zconf.l
> > +++ b/scripts/kconfig/zconf.l
> > @@ -68,7 +68,6 @@ static void alloc_string(const char *str, int size)
> >  }
> >  %}
> >  
> > -ws [ \n\t]
> >  n  [A-Za-z0-9_]
> >  
> >  %%
> 

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --==< O_o >==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|  """  conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] kconfig: remove unused definition from scanner

2013-10-02 Thread Yann E. MORIN
Martin, All,

On Wednesday 02 October 2013 08:42:59 Dirk Gouders wrote:
 Martin Walch walch.mar...@web.de writes:
 
  From: Martin Walch walch.mar...@web.de
  Date: Wed, 2 Oct 2013 06:58:46 +0200
  Subject: [PATCH 4/4] kconfig: remove unused definition from scanner
 
  The definition ws [ \n\t] is not used anywhere. Drop it to avoid confusion.
 
 Hi Martin,
 
 I think you should also regenerate the scanner and add
 the new zconf.lex.c_shipped to this patch.

I think sending the re-generated parser as a separate patch helps
in reviewing. Ie. I'd prefer a fifth patch.

BTW, regenerating the parser can be done with:
make REGENERATE_PARSERS=1 config

Regards,
Yann E. MORIN.

  Signed-off-by: Martin Walch walch.mar...@web.de
  ---
   scripts/kconfig/zconf.l | 1 -
   1 file changed, 1 deletion(-)
 
  diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
  index 6555a47..1a9f53e 100644
  --- a/scripts/kconfig/zconf.l
  +++ b/scripts/kconfig/zconf.l
  @@ -68,7 +68,6 @@ static void alloc_string(const char *str, int size)
   }
   %}
   
  -ws [ \n\t]
   n  [A-Za-z0-9_]
   
   %%
 

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --== O_o ==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[pull request] Pull request for branch yem/kconfig-rc-fixes

2013-09-30 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Michal,

Please pull these two changes for 3.12-rc:
  - a fix for "make install" on ARM, by Robert Richter, acked by Linus
and yourself;
  - a fix for "make allmodconfig" when KCONFIG_ALLCONFIG is set, which
already flew on the list, but with a better commit log now.

Regards,
Yann E. MORIN.


The following changes since commit 86eb781889ec31f6421b86ab252ea609d456322d:

  scripts/config: fix variable substitution command (2013-09-13 13:06:59 +0200)

are available in the git repository at:

  git://gitorious.org/linux-kconfig/linux-kconfig.git yem/kconfig-rc-fixes

for you to fetch changes up to 3b03272a6e6f0f2c8d4b7751d35baa1ce41984aa:

  arm, kbuild: make "make install" not depend on vmlinux (2013-09-30 18:48:50 
+0200)


Robert Richter (1):
  arm, kbuild: make "make install" not depend on vmlinux

Yann E. MORIN (1):
  kconfig: fix allmodconfig in presence of KCONFIG_ALLCONFIG

 arch/arm/Makefile  |  9 +++--
 arch/arm/boot/Makefile | 16 
 arch/arm/boot/install.sh   | 14 ++
 scripts/kconfig/confdata.c |  6 --
 4 files changed, 33 insertions(+), 12 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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm, kbuild: make "make install" not depend on vmlinux

2013-09-30 Thread Yann E. MORIN
Robert, All,

On 2013-09-30 10:49 +0200, Robert Richter spake thusly:
> On 18.07.13 11:22:24, Michal Marek wrote:
> > > So Michal (or ARM people - whoever wants to take the patch), just take
> > > my ack. No objections.
> > 
> > I can add it to the kbuild tree if needed. Otherwise you can add
> > Acked-by: Michal Marek .
> 
> This didn't make it upstream yet, can somebody at it to a tree?

Since it's been acked-by Linus, I'll queue it in my tree, for Michal to
pull from. Expect a pull-request soon.

Regards,
Yann E. MORIN.

-- 
.-..----------..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm, kbuild: make make install not depend on vmlinux

2013-09-30 Thread Yann E. MORIN
Robert, All,

On 2013-09-30 10:49 +0200, Robert Richter spake thusly:
 On 18.07.13 11:22:24, Michal Marek wrote:
   So Michal (or ARM people - whoever wants to take the patch), just take
   my ack. No objections.
  
  I can add it to the kbuild tree if needed. Otherwise you can add
  Acked-by: Michal Marek mma...@suse.cz.
 
 This didn't make it upstream yet, can somebody at it to a tree?

Since it's been acked-by Linus, I'll queue it in my tree, for Michal to
pull from. Expect a pull-request soon.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[pull request] Pull request for branch yem/kconfig-rc-fixes

2013-09-30 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Michal,

Please pull these two changes for 3.12-rc:
  - a fix for make install on ARM, by Robert Richter, acked by Linus
and yourself;
  - a fix for make allmodconfig when KCONFIG_ALLCONFIG is set, which
already flew on the list, but with a better commit log now.

Regards,
Yann E. MORIN.


The following changes since commit 86eb781889ec31f6421b86ab252ea609d456322d:

  scripts/config: fix variable substitution command (2013-09-13 13:06:59 +0200)

are available in the git repository at:

  git://gitorious.org/linux-kconfig/linux-kconfig.git yem/kconfig-rc-fixes

for you to fetch changes up to 3b03272a6e6f0f2c8d4b7751d35baa1ce41984aa:

  arm, kbuild: make make install not depend on vmlinux (2013-09-30 18:48:50 
+0200)


Robert Richter (1):
  arm, kbuild: make make install not depend on vmlinux

Yann E. MORIN (1):
  kconfig: fix allmodconfig in presence of KCONFIG_ALLCONFIG

 arch/arm/Makefile  |  9 +++--
 arch/arm/boot/Makefile | 16 
 arch/arm/boot/install.sh   | 14 ++
 scripts/kconfig/confdata.c |  6 --
 4 files changed, 33 insertions(+), 12 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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] kconfig/menu.c: fix uninitialized variable warning

2013-09-26 Thread Yann E. MORIN
Madhavan, All,

On 2013-09-22 22:35 +0530, Madhavan Srinivasan spake thusly:
> In file included from scripts/kconfig/zconf.tab.c:2537:0:
> scripts/kconfig/menu.c: In function ‘get_symbol_str’:
> scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used uninitialized in
> this function [-Wmaybe-uninitialized]
>  jump->offset = r->len - 1;
>   ^
> scripts/kconfig/menu.c:547:19: note: ‘jump’ was declared here
>   struct jump_key *jump;
>^
> Change V2:
> 
> 1)Added comment as suggested.

Maybe I'm mislead, but I think Benjamin and I suggested a comment that
explained the warning was just spurious, and there would be no code
change. Something like:

/* gcc 4.8.0 on (your distro and version) warns about 'jump may be
 * used uninitialized', which is wrong. The warning does not appear
 * with gcc != 4.8.0 */
struct jump_key *jump;

This is so, if sometime in the future the code changes, and the variable
is indeeded used uninitialised, we have a proper warning by gcc in this
case.

Care to resend, please?

Regards,
Yann E. MORIN.

> Signed-off-by: Madhavan Srinivasan 
> ---
>  scripts/kconfig/menu.c |3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index c1d5320..32ee2d5 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -544,7 +544,8 @@ static void get_prompt_str(struct gstr *r, struct 
> property *prop,
>  {
>   int i, j;
>   struct menu *submenu[8], *menu, *location = NULL;
> - struct jump_key *jump;
> + /* Initializing to avoid a spurious warning observed in gcc 4.8.0 */
> + struct jump_key *jump = NULL;
>  
>   str_printf(r, _("Prompt: %s\n"), _(prop->text));
>   menu = prop->menu->parent;
> -- 
> 1.7.10.4
> 

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] kconfig/menu.c: fix uninitialized variable warning

2013-09-26 Thread Yann E. MORIN
Madhavan, All,

On 2013-09-22 22:35 +0530, Madhavan Srinivasan spake thusly:
 In file included from scripts/kconfig/zconf.tab.c:2537:0:
 scripts/kconfig/menu.c: In function ‘get_symbol_str’:
 scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used uninitialized in
 this function [-Wmaybe-uninitialized]
  jump-offset = r-len - 1;
   ^
 scripts/kconfig/menu.c:547:19: note: ‘jump’ was declared here
   struct jump_key *jump;
^
 Change V2:
 
 1)Added comment as suggested.

Maybe I'm mislead, but I think Benjamin and I suggested a comment that
explained the warning was just spurious, and there would be no code
change. Something like:

/* gcc 4.8.0 on (your distro and version) warns about 'jump may be
 * used uninitialized', which is wrong. The warning does not appear
 * with gcc != 4.8.0 */
struct jump_key *jump;

This is so, if sometime in the future the code changes, and the variable
is indeeded used uninitialised, we have a proper warning by gcc in this
case.

Care to resend, please?

Regards,
Yann E. MORIN.

 Signed-off-by: Madhavan Srinivasan ma...@linux.vnet.ibm.com
 ---
  scripts/kconfig/menu.c |3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
 index c1d5320..32ee2d5 100644
 --- a/scripts/kconfig/menu.c
 +++ b/scripts/kconfig/menu.c
 @@ -544,7 +544,8 @@ static void get_prompt_str(struct gstr *r, struct 
 property *prop,
  {
   int i, j;
   struct menu *submenu[8], *menu, *location = NULL;
 - struct jump_key *jump;
 + /* Initializing to avoid a spurious warning observed in gcc 4.8.0 */
 + struct jump_key *jump = NULL;
  
   str_printf(r, _(Prompt: %s\n), _(prop-text));
   menu = prop-menu-parent;
 -- 
 1.7.10.4
 

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Documentation/kbuild/kconfig.txt: Doesn't make listnewconfig replacing yes "" | make oldconfig ?

2013-09-21 Thread Yann E. MORIN
Regid, All,

On 2013-09-12 03:35 +0300, Regid Ichira spake thusly:
> Signed-off-by: Regid Ichira 
> ---
>  Documentation/kbuild/kconfig.txt | 11 ++-
>  1 file changed, 2 insertions(+), 9 deletions(-)

There was a trailing whitespace. I fixed it here, and pulled it in my
tree for -next.

Thanks!

Regards,
Yann E. MORIN.

> diff --git a/Documentation/kbuild/kconfig.txt 
> b/Documentation/kbuild/kconfig.txt
> index 8ef6dbb..14cc40c 100644
> --- a/Documentation/kbuild/kconfig.txt
> +++ b/Documentation/kbuild/kconfig.txt
> @@ -20,16 +20,9 @@ symbols have been introduced.
>  To see a list of new config symbols when using "make oldconfig", use
>  
>   cp user/some/old.config .config
> - yes "" | make oldconfig >conf.new
> + make listnewconfig 
   trailing whitespace ---^

>  
> -and the config program will list as (NEW) any new symbols that have
> -unknown values.  Of course, the .config file is also updated with
> -new (default) values, so you can use:
> -
> - grep "(NEW)" conf.new
> -
> -to see the new config symbols or you can use diffconfig to see the
> -differences between the previous and new .config files:
> +and the config program will list any new symbols, one per line.
>  
>   scripts/diffconfig .config.old .config | less
>  
> -- 
> 1.8.4.rc3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Documentation/kbuild/kconfig.txt: Doesn't make listnewconfig replacing yes | make oldconfig ?

2013-09-21 Thread Yann E. MORIN
Regid, All,

On 2013-09-12 03:35 +0300, Regid Ichira spake thusly:
 Signed-off-by: Regid Ichira regi...@nt1.in
 ---
  Documentation/kbuild/kconfig.txt | 11 ++-
  1 file changed, 2 insertions(+), 9 deletions(-)

There was a trailing whitespace. I fixed it here, and pulled it in my
tree for -next.

Thanks!

Regards,
Yann E. MORIN.

 diff --git a/Documentation/kbuild/kconfig.txt 
 b/Documentation/kbuild/kconfig.txt
 index 8ef6dbb..14cc40c 100644
 --- a/Documentation/kbuild/kconfig.txt
 +++ b/Documentation/kbuild/kconfig.txt
 @@ -20,16 +20,9 @@ symbols have been introduced.
  To see a list of new config symbols when using make oldconfig, use
  
   cp user/some/old.config .config
 - yes  | make oldconfig conf.new
 + make listnewconfig 
   trailing whitespace ---^

  
 -and the config program will list as (NEW) any new symbols that have
 -unknown values.  Of course, the .config file is also updated with
 -new (default) values, so you can use:
 -
 - grep (NEW) conf.new
 -
 -to see the new config symbols or you can use diffconfig to see the
 -differences between the previous and new .config files:
 +and the config program will list any new symbols, one per line.
  
   scripts/diffconfig .config.old .config | less
  
 -- 
 1.8.4.rc3
 --
 To unsubscribe from this list: send the line unsubscribe linux-kbuild in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH]kconfig/menu.c: fix uninitialized variable warning

2013-09-20 Thread Yann E. MORIN
Benjamin, Madhavan, All,

On 2013-09-20 13:58 -0400, Benjamin Poirier spake thusly:
> On 2013/09/20 08:05, Madhavan Srinivasan wrote:
> > On Friday 20 September 2013 01:34 AM, Yann E. MORIN wrote:
> > > Benjamin, All,
> > > 
> > > On 2013-09-19 15:13 -0400, Benjamin Poirier spake thusly:
> > >> On 2013/09/19 19:27, Yann E. MORIN wrote:
> > >>> Benjamin, Madhavan, All,
> > >>>
> > >>> On 2013-09-19 11:22 -0400, Benjamin Poirier spake thusly:
> > >>>> On 2013/09/19 12:58, Madhavan Srinivasan wrote:
> > >>>>> In file included from scripts/kconfig/zconf.tab.c:2537:0:
> > >>>>> scripts/kconfig/menu.c: In function ‘get_symbol_str’:
> > >>>>> scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used 
> > >>>>> uninitialized in
> > >>>>> this function [-Wmaybe-uninitialized]
> [...]
> > >>>>
> > >>>> I do not see this warning with gcc 4.7.2 or 4.8.1. Which version are 
> > >>>> you
> > >>>> using?
> > >>>>
> [...]
> > > 
> > > No, I was not able to reproduce it with either gcc-4.4.7, gcc-4.6.4 or
> > > gcc-4.7.3 on my Ubuntu 13.04. Neither gcc-4.5 nor 4.8 are packaged, so
> > > I could not test them.
> > > 
> > > Anyway, -Wmaybe-uninitialized is new with 4.7. So, the warning can't
> > > happen with gcc < 4.7.
> > > 
> > > Madhavan, what gcc version are you using?
> > gcc i have is gcc version 4.8.0 20130526
> 
> In that case, I don't have a strong opinion whether the patch should be
> merged or not, but if it is merged, I think a comment should be added to
> the code or the changelog stating that this is to work around a
> deficiency observed in gcc 4.8.0.

If it is /fixed/ in gcc 4.8.1 (as you imply since you tested it), I
don't see a reason to apply this patch, in the end.

Rather, I would just put a comment in the code stating this is a
spurious warning, and keep the code as-is.

Madhavan, care to resend your patch with such a comment instead of
setting jump=NULL, please?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH]kconfig/menu.c: fix uninitialized variable warning

2013-09-20 Thread Yann E. MORIN
Benjamin, Madhavan, All,

On 2013-09-20 13:58 -0400, Benjamin Poirier spake thusly:
 On 2013/09/20 08:05, Madhavan Srinivasan wrote:
  On Friday 20 September 2013 01:34 AM, Yann E. MORIN wrote:
   Benjamin, All,
   
   On 2013-09-19 15:13 -0400, Benjamin Poirier spake thusly:
   On 2013/09/19 19:27, Yann E. MORIN wrote:
   Benjamin, Madhavan, All,
  
   On 2013-09-19 11:22 -0400, Benjamin Poirier spake thusly:
   On 2013/09/19 12:58, Madhavan Srinivasan wrote:
   In file included from scripts/kconfig/zconf.tab.c:2537:0:
   scripts/kconfig/menu.c: In function ‘get_symbol_str’:
   scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used 
   uninitialized in
   this function [-Wmaybe-uninitialized]
 [...]
  
   I do not see this warning with gcc 4.7.2 or 4.8.1. Which version are 
   you
   using?
  
 [...]
   
   No, I was not able to reproduce it with either gcc-4.4.7, gcc-4.6.4 or
   gcc-4.7.3 on my Ubuntu 13.04. Neither gcc-4.5 nor 4.8 are packaged, so
   I could not test them.
   
   Anyway, -Wmaybe-uninitialized is new with 4.7. So, the warning can't
   happen with gcc  4.7.
   
   Madhavan, what gcc version are you using?
  gcc i have is gcc version 4.8.0 20130526
 
 In that case, I don't have a strong opinion whether the patch should be
 merged or not, but if it is merged, I think a comment should be added to
 the code or the changelog stating that this is to work around a
 deficiency observed in gcc 4.8.0.

If it is /fixed/ in gcc 4.8.1 (as you imply since you tested it), I
don't see a reason to apply this patch, in the end.

Rather, I would just put a comment in the code stating this is a
spurious warning, and keep the code as-is.

Madhavan, care to resend your patch with such a comment instead of
setting jump=NULL, please?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH]kconfig/menu.c: fix uninitialized variable warning

2013-09-19 Thread Yann E. MORIN
Benjamin, All,

On 2013-09-19 15:13 -0400, Benjamin Poirier spake thusly:
> On 2013/09/19 19:27, Yann E. MORIN wrote:
> > Benjamin, Madhavan, All,
> > 
> > On 2013-09-19 11:22 -0400, Benjamin Poirier spake thusly:
> > > On 2013/09/19 12:58, Madhavan Srinivasan wrote:
> > > > In file included from scripts/kconfig/zconf.tab.c:2537:0:
> > > > scripts/kconfig/menu.c: In function ‘get_symbol_str’:
> > > > scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used 
> > > > uninitialized in
> > > > this function [-Wmaybe-uninitialized]
> > >^
> > > 
> > > from gcc(1):
> > >   "These warnings are made optional because GCC is not smart
> > >   enough to see all the reasons why the code might be correct
> > >   despite appearing to have an error."
> > > 
> > > I do not see this warning with gcc 4.7.2 or 4.8.1. Which version are you
> > > using?
> > > 
> > > The code does:
> > > 
> > > static void get_prompt_str(struct gstr *r, struct property *prop,
> > > [...]
> > >   if (head && location) {
> > >   jump = xmalloc(sizeof(struct jump_key));
> > > [... different basic block ...]
> > >   if (head && location && menu == location)
> > >   jump->offset = r->len - 1;
> > > 
> > > If the second "if" is true, then the first one was true as well, and
> > > "jump" is initilized.
> > 
> > Exactly what I was going to say.
> > 
> > However:
> >   - I believe we should strive for a warning-free code whenever possible
> >   - while still getting help from gcc to pinpoint potential issues.
> > 
> > Clearly, gcc is wrong here. Setting jump to NULL will cause fault if we
> > try to dereference it. Since this should never happen given the code as
> > it currently is, I'm slightly in favour of acking this patch.
> > 
> > Any other reason not to apply it?
> 
> Did you manage to get that warning as well? I didn't. If it's only from
> old versions of gcc I'd feel better leaving the warning there than
> masking it, in case a future code change does really introduce a use
> before initialize.

No, I was not able to reproduce it with either gcc-4.4.7, gcc-4.6.4 or
gcc-4.7.3 on my Ubuntu 13.04. Neither gcc-4.5 nor 4.8 are packaged, so
I could not test them.

Anyway, -Wmaybe-uninitialized is new with 4.7. So, the warning can't
happen with gcc < 4.7.

Madhavan, what gcc version are you using?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH]kconfig/menu.c: fix uninitialized variable warning

2013-09-19 Thread Yann E. MORIN
Benjamin, Madhavan, All,

On 2013-09-19 11:22 -0400, Benjamin Poirier spake thusly:
> On 2013/09/19 12:58, Madhavan Srinivasan wrote:
> > In file included from scripts/kconfig/zconf.tab.c:2537:0:
> > scripts/kconfig/menu.c: In function ‘get_symbol_str’:
> > scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used uninitialized in
> > this function [-Wmaybe-uninitialized]
>^
> 
> from gcc(1):
>   "These warnings are made optional because GCC is not smart
>   enough to see all the reasons why the code might be correct
>   despite appearing to have an error."
> 
> I do not see this warning with gcc 4.7.2 or 4.8.1. Which version are you
> using?
> 
> The code does:
> 
> static void get_prompt_str(struct gstr *r, struct property *prop,
> [...]
>   if (head && location) {
>   jump = xmalloc(sizeof(struct jump_key));
> [... different basic block ...]
>   if (head && location && menu == location)
>   jump->offset = r->len - 1;
> 
> If the second "if" is true, then the first one was true as well, and
> "jump" is initilized.

Exactly what I was going to say.

However:
  - I believe we should strive for a warning-free code whenever possible
  - while still getting help from gcc to pinpoint potential issues.

Clearly, gcc is wrong here. Setting jump to NULL will cause fault if we
try to dereference it. Since this should never happen given the code as
it currently is, I'm slightly in favour of acking this patch.

Any other reason not to apply it?

> >  jump->offset = r->len - 1;
> >   ^
> > scripts/kconfig/menu.c:547:19: note: ‘jump’ was declared here
> >   struct jump_key *jump;
> >^
> > Signed-off-by: Madhavan Srinivasan 
> > ---
> >  scripts/kconfig/menu.c |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> > index c1d5320..23b1827 100644
> > --- a/scripts/kconfig/menu.c
> > +++ b/scripts/kconfig/menu.c
> > @@ -544,7 +544,7 @@ static void get_prompt_str(struct gstr *r, struct 
> > property *prop,
> >  {
> > int i, j;
> > struct menu *submenu[8], *menu, *location = NULL;
> > -   struct jump_key *jump;
> > +   struct jump_key *jump = NULL;
> > 
> > str_printf(r, _("Prompt: %s\n"), _(prop->text));
> > menu = prop->menu->parent;
> > --
> > 1.7.10.4
> > 

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH]kconfig/menu.c: fix uninitialized variable warning

2013-09-19 Thread Yann E. MORIN
Benjamin, Madhavan, All,

On 2013-09-19 11:22 -0400, Benjamin Poirier spake thusly:
 On 2013/09/19 12:58, Madhavan Srinivasan wrote:
  In file included from scripts/kconfig/zconf.tab.c:2537:0:
  scripts/kconfig/menu.c: In function ‘get_symbol_str’:
  scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used uninitialized in
  this function [-Wmaybe-uninitialized]
^
 
 from gcc(1):
   These warnings are made optional because GCC is not smart
   enough to see all the reasons why the code might be correct
   despite appearing to have an error.
 
 I do not see this warning with gcc 4.7.2 or 4.8.1. Which version are you
 using?
 
 The code does:
 
 static void get_prompt_str(struct gstr *r, struct property *prop,
 [...]
   if (head  location) {
   jump = xmalloc(sizeof(struct jump_key));
 [... different basic block ...]
   if (head  location  menu == location)
   jump-offset = r-len - 1;
 
 If the second if is true, then the first one was true as well, and
 jump is initilized.

Exactly what I was going to say.

However:
  - I believe we should strive for a warning-free code whenever possible
  - while still getting help from gcc to pinpoint potential issues.

Clearly, gcc is wrong here. Setting jump to NULL will cause fault if we
try to dereference it. Since this should never happen given the code as
it currently is, I'm slightly in favour of acking this patch.

Any other reason not to apply it?

   jump-offset = r-len - 1;
^
  scripts/kconfig/menu.c:547:19: note: ‘jump’ was declared here
struct jump_key *jump;
 ^
  Signed-off-by: Madhavan Srinivasan ma...@linux.vnet.ibm.com
  ---
   scripts/kconfig/menu.c |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
  index c1d5320..23b1827 100644
  --- a/scripts/kconfig/menu.c
  +++ b/scripts/kconfig/menu.c
  @@ -544,7 +544,7 @@ static void get_prompt_str(struct gstr *r, struct 
  property *prop,
   {
  int i, j;
  struct menu *submenu[8], *menu, *location = NULL;
  -   struct jump_key *jump;
  +   struct jump_key *jump = NULL;
  
  str_printf(r, _(Prompt: %s\n), _(prop-text));
  menu = prop-menu-parent;
  --
  1.7.10.4
  

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH]kconfig/menu.c: fix uninitialized variable warning

2013-09-19 Thread Yann E. MORIN
Benjamin, All,

On 2013-09-19 15:13 -0400, Benjamin Poirier spake thusly:
 On 2013/09/19 19:27, Yann E. MORIN wrote:
  Benjamin, Madhavan, All,
  
  On 2013-09-19 11:22 -0400, Benjamin Poirier spake thusly:
   On 2013/09/19 12:58, Madhavan Srinivasan wrote:
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:586:18: warning: ‘jump’ may be used 
uninitialized in
this function [-Wmaybe-uninitialized]
  ^
   
   from gcc(1):
 These warnings are made optional because GCC is not smart
 enough to see all the reasons why the code might be correct
 despite appearing to have an error.
   
   I do not see this warning with gcc 4.7.2 or 4.8.1. Which version are you
   using?
   
   The code does:
   
   static void get_prompt_str(struct gstr *r, struct property *prop,
   [...]
 if (head  location) {
 jump = xmalloc(sizeof(struct jump_key));
   [... different basic block ...]
 if (head  location  menu == location)
 jump-offset = r-len - 1;
   
   If the second if is true, then the first one was true as well, and
   jump is initilized.
  
  Exactly what I was going to say.
  
  However:
- I believe we should strive for a warning-free code whenever possible
- while still getting help from gcc to pinpoint potential issues.
  
  Clearly, gcc is wrong here. Setting jump to NULL will cause fault if we
  try to dereference it. Since this should never happen given the code as
  it currently is, I'm slightly in favour of acking this patch.
  
  Any other reason not to apply it?
 
 Did you manage to get that warning as well? I didn't. If it's only from
 old versions of gcc I'd feel better leaving the warning there than
 masking it, in case a future code change does really introduce a use
 before initialize.

No, I was not able to reproduce it with either gcc-4.4.7, gcc-4.6.4 or
gcc-4.7.3 on my Ubuntu 13.04. Neither gcc-4.5 nor 4.8 are packaged, so
I could not test them.

Anyway, -Wmaybe-uninitialized is new with 4.7. So, the warning can't
happen with gcc  4.7.

Madhavan, what gcc version are you using?

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: scripts/config: fix variable substitution command

2013-09-14 Thread Yann E. MORIN
Sedat, All,

On 2013-09-14 16:43 +0200, Sedat Dilek spake thusly:
> On Sat, Sep 14, 2013 at 4:21 PM, Clément Chauplannaz  
> wrote:
> > 2013/9/14 Sedat Dilek :
[--SNIP--]
> >> So, can you point me/us to the correct commit with subject, please?!
> >
> > My apologies for that mistake. The initial commit, as present in Linus 
> > tree, is:
> > 83e8b90e1d2cc5ff5d2443f2486c2d786a4997ce - scripts/config: use sed's
> > POSIX interface
> >
> > Thus, the commit message for this patch should read:
> > scripts/config: fix variable substitution command
> >
> > Commit 83e8b90e1d2cc5ff5d2443f2486c2d786a4997ce ("scripts/config: use sed's
> > POSIX interface") accidentally changed the separator between sed `s' command
> > and its parameters from ':' to '/'.
> >
> > Revert this change.
> >
> > Reported-and-tested-by: Linus Walleij 
> > Signed-off-by: Clement Chauplannaz 
> > Signed-off-by: Michal Marek 
> >
> 
> What means "pending" [1]?

The current script had a latent bug that would trigger when the user want
to set a string that contains a colon ':'.

This behaviour was changed by Clément, and the bug was then about strings
with a '/' instead. This was a regression for some users.

The behaviour was then reverted to break on strings containing ':'.

What is pending is a final fix that will fix both cases.

> Pending in sense of "we are working on it" or in the sense of
> "exists-but-not-published".

The final fix is trivial and identified, so I guess that Clément has yet
had time to send the patch.

> I did not found a hint on the offline linux-kbuild ML.

That would be Michal's suggestion there:
http://marc.info/?l=linux-kbuild=137907001305533=2

> BTW, the GIT repo of Yann is not browsable (which is sh*t for checking
> commits quickl, I don't want to be forced to checkout).

Yes, I know about that one. I've already notified the gitorious guys
about the issue, they supposedly fixed it, but it is broken again.

I will re-open my ticket in a moment.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: scripts/config: fix variable substitution command

2013-09-14 Thread Yann E. MORIN
Sedat, All,

On 2013-09-14 14:21 +0200, Sedat Dilek spake thusly:
> The ChangeLog from [1] says:
> 
> Commit 229455bc02b87f7128f190c4491b4ce38648 accidentally changed
> the separator between sed `s' command and its parameters from ':' to
> '/'.
> Revert this change.
[--SNIP--]
> Is this patch even "CC: stable"?

It was not in any previous released version, since it went in Linus'
tree for 3.12. As such, it does not make sense to Cc: stable.

Regards,
Yann E. MORIN.

-- 
.-..--.----.
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: scripts/config: fix variable substitution command

2013-09-14 Thread Yann E. MORIN
Sedat, All,

On 2013-09-14 14:21 +0200, Sedat Dilek spake thusly:
 The ChangeLog from [1] says:
 
 Commit 229455bc02b87f7128f190c4491b4ce38648 accidentally changed
 the separator between sed `s' command and its parameters from ':' to
 '/'.
 Revert this change.
[--SNIP--]
 Is this patch even CC: stable?

It was not in any previous released version, since it went in Linus'
tree for 3.12. As such, it does not make sense to Cc: stable.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: scripts/config: fix variable substitution command

2013-09-14 Thread Yann E. MORIN
Sedat, All,

On 2013-09-14 16:43 +0200, Sedat Dilek spake thusly:
 On Sat, Sep 14, 2013 at 4:21 PM, Clément Chauplannaz chaup...@gmail.com 
 wrote:
  2013/9/14 Sedat Dilek sedat.di...@gmail.com:
[--SNIP--]
  So, can you point me/us to the correct commit with subject, please?!
 
  My apologies for that mistake. The initial commit, as present in Linus 
  tree, is:
  83e8b90e1d2cc5ff5d2443f2486c2d786a4997ce - scripts/config: use sed's
  POSIX interface
 
  Thus, the commit message for this patch should read:
  scripts/config: fix variable substitution command
 
  Commit 83e8b90e1d2cc5ff5d2443f2486c2d786a4997ce (scripts/config: use sed's
  POSIX interface) accidentally changed the separator between sed `s' command
  and its parameters from ':' to '/'.
 
  Revert this change.
 
  Reported-and-tested-by: Linus Walleij linus.wall...@linaro.org
  Signed-off-by: Clement Chauplannaz chaup...@gmail.com
  Signed-off-by: Michal Marek mma...@suse.cz
 
 
 What means pending [1]?

The current script had a latent bug that would trigger when the user want
to set a string that contains a colon ':'.

This behaviour was changed by Clément, and the bug was then about strings
with a '/' instead. This was a regression for some users.

The behaviour was then reverted to break on strings containing ':'.

What is pending is a final fix that will fix both cases.

 Pending in sense of we are working on it or in the sense of
 exists-but-not-published.

The final fix is trivial and identified, so I guess that Clément has yet
had time to send the patch.

 I did not found a hint on the offline linux-kbuild ML.

That would be Michal's suggestion there:
http://marc.info/?l=linux-kbuildm=137907001305533w=2

 BTW, the GIT repo of Yann is not browsable (which is sh*t for checking
 commits quickl, I don't want to be forced to checkout).

Yes, I know about that one. I've already notified the gitorious guys
about the issue, they supposedly fixed it, but it is broken again.

I will re-open my ticket in a moment.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Documentation/kbuild/kconfig.txt: Doesn't make listnewconfig replacing yes "" | make oldconfig ?

2013-09-12 Thread Yann E. MORIN
Regid, All,

On 2013-09-12 03:35 +0300, Regid Ichira spake thusly:
> Signed-off-by: Regid Ichira 

Acked-by: "Yann E. MORIN" 

> ---
>  Documentation/kbuild/kconfig.txt | 11 ++-
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/kbuild/kconfig.txt 
> b/Documentation/kbuild/kconfig.txt
> index 8ef6dbb..14cc40c 100644
> --- a/Documentation/kbuild/kconfig.txt
> +++ b/Documentation/kbuild/kconfig.txt
> @@ -20,16 +20,9 @@ symbols have been introduced.
>  To see a list of new config symbols when using "make oldconfig", use
>  
>   cp user/some/old.config .config
> - yes "" | make oldconfig >conf.new
> + make listnewconfig 
>  
> -and the config program will list as (NEW) any new symbols that have
> -unknown values.  Of course, the .config file is also updated with
> -new (default) values, so you can use:
> -
> - grep "(NEW)" conf.new
> -
> -to see the new config symbols or you can use diffconfig to see the
> -differences between the previous and new .config files:
> +and the config program will list any new symbols, one per line.
>  
>   scripts/diffconfig .config.old .config | less
>  
> -- 
> 1.8.4.rc3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Documentation/kbuild/kconfig.txt: Doesn't make listnewconfig replacing yes | make oldconfig ?

2013-09-12 Thread Yann E. MORIN
Regid, All,

On 2013-09-12 03:35 +0300, Regid Ichira spake thusly:
 Signed-off-by: Regid Ichira regi...@nt1.in

Acked-by: Yann E. MORIN yann.morin.1...@free.fr

 ---
  Documentation/kbuild/kconfig.txt | 11 ++-
  1 file changed, 2 insertions(+), 9 deletions(-)
 
 diff --git a/Documentation/kbuild/kconfig.txt 
 b/Documentation/kbuild/kconfig.txt
 index 8ef6dbb..14cc40c 100644
 --- a/Documentation/kbuild/kconfig.txt
 +++ b/Documentation/kbuild/kconfig.txt
 @@ -20,16 +20,9 @@ symbols have been introduced.
  To see a list of new config symbols when using make oldconfig, use
  
   cp user/some/old.config .config
 - yes  | make oldconfig conf.new
 + make listnewconfig 
  
 -and the config program will list as (NEW) any new symbols that have
 -unknown values.  Of course, the .config file is also updated with
 -new (default) values, so you can use:
 -
 - grep (NEW) conf.new
 -
 -to see the new config symbols or you can use diffconfig to see the
 -differences between the previous and new .config files:
 +and the config program will list any new symbols, one per line.
  
   scripts/diffconfig .config.old .config | less
  
 -- 
 1.8.4.rc3
 --
 To unsubscribe from this list: send the line unsubscribe linux-kbuild in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH tip/core/rcu 8/9] nohz_full: Add full-system-idle state machine

2013-09-08 Thread Yann E. MORIN
Paul, All,

On 2013-09-07 11:57 -0700, Paul E. McKenney spake thusly:
> On Sat, Sep 07, 2013 at 11:13:48AM +0200, Yann E. MORIN wrote:
[--SNIP--]
> > I'll see if I can come up with a meaningfull construct that fixes your
> > use-case. Don't hold your breath, though! ;-)
> 
> If not, we need to add NR_CPUS to the architectures lacking them...

Unfortunately, I was not able to come up with anything suitable.

I think your proposal to always define NR_CPUS=1 for architectures
without SMP support is a good solution.

After all, if !SMP because the architecture does not support it, I
believe it makes sense that NR_CPUS be defined to 1.

Unless NR_CPUS carries with it a hidden meaning about SMP being
possible, that is, which would probably be wrong anyway, since we have
SMP for this.

Regards,
Yann E. MORIN.

-- 
.-..--.--------.
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH tip/core/rcu 8/9] nohz_full: Add full-system-idle state machine

2013-09-08 Thread Yann E. MORIN
Paul, All,

On 2013-09-07 11:57 -0700, Paul E. McKenney spake thusly:
 On Sat, Sep 07, 2013 at 11:13:48AM +0200, Yann E. MORIN wrote:
[--SNIP--]
  I'll see if I can come up with a meaningfull construct that fixes your
  use-case. Don't hold your breath, though! ;-)
 
 If not, we need to add NR_CPUS to the architectures lacking them...

Unfortunately, I was not able to come up with anything suitable.

I think your proposal to always define NR_CPUS=1 for architectures
without SMP support is a good solution.

After all, if !SMP because the architecture does not support it, I
believe it makes sense that NR_CPUS be defined to 1.

Unless NR_CPUS carries with it a hidden meaning about SMP being
possible, that is, which would probably be wrong anyway, since we have
SMP for this.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH tip/core/rcu 8/9] nohz_full: Add full-system-idle state machine

2013-09-07 Thread Yann E. MORIN
Paul, All,

On 2013-09-06 10:30 -0700, Paul E. McKenney spake thusly:
[--SNIP--]
> I also tried using Kconfig "if":
> 
> if SMP
> config NR_CPUS_REALLY
>   int "Fixed version of NR_CPUS"
>   default NR_CPUS
> endif
> if !SMP
> config NR_CPUS_REALLY
>   int "Fixed version of NR_CPUS"
>   default 1 if !SMP

The 'if !SMP' here is unneeded, you're already in a 'if !SMP' if-block.

> endif
> 
> However, Kconfig complained about the use of NR_CPUS even though this
> was under an "if" whose condition was not set.  Perhaps someone with
> better Kconfig-fu than I have can come up with something.

That's because the 'if' condition is added to the dependency list of the
symbol(s) that is(are) enclosed in the if.

'if' in Kconfig behaves the same way as an 'if' in C. What you expected
(I believe) was the behaviour of '#ifdef', which is not the case. From
Documentation/kbuild/kconfig-language.txt:

---8<---
if:

"if" 

"endif"

This defines an if block. The dependency expression  is appended
to all enclosed menu entries.
---8<---

There's no equivlaent to '#ifdef' in Kconfig.

I'll see if I can come up with a meaningfull construct that fixes your
use-case. Don't hold your breath, though! ;-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH tip/core/rcu 8/9] nohz_full: Add full-system-idle state machine

2013-09-07 Thread Yann E. MORIN
Paul, All,

On 2013-09-06 10:30 -0700, Paul E. McKenney spake thusly:
[--SNIP--]
 I also tried using Kconfig if:
 
 if SMP
 config NR_CPUS_REALLY
   int Fixed version of NR_CPUS
   default NR_CPUS
 endif
 if !SMP
 config NR_CPUS_REALLY
   int Fixed version of NR_CPUS
   default 1 if !SMP

The 'if !SMP' here is unneeded, you're already in a 'if !SMP' if-block.

 endif
 
 However, Kconfig complained about the use of NR_CPUS even though this
 was under an if whose condition was not set.  Perhaps someone with
 better Kconfig-fu than I have can come up with something.

That's because the 'if' condition is added to the dependency list of the
symbol(s) that is(are) enclosed in the if.

'if' in Kconfig behaves the same way as an 'if' in C. What you expected
(I believe) was the behaviour of '#ifdef', which is not the case. From
Documentation/kbuild/kconfig-language.txt:

---8---
if:

if expr
if block
endif

This defines an if block. The dependency expression expr is appended
to all enclosed menu entries.
---8---

There's no equivlaent to '#ifdef' in Kconfig.

I'll see if I can come up with a meaningfull construct that fixes your
use-case. Don't hold your breath, though! ;-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-06 Thread Yann E. MORIN
Michal, All,

On 2013-09-05 12:02 +0200, Michal Marek spake thusly:
> On 5.9.2013 11:38, Michal Marek wrote:
> > On 3.9.2013 23:04, Yann E. MORIN wrote:
> >> From: "Yann E. MORIN" 
> >> 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.
> > 
> > Wasn't this change supposed to fix allmodconfig with KCONFIG_ALLCONFIG
> > (http://lkml.org/lkml/2013/8/8/573)? Or is there still more to do?
> > Because I'm still getting:
> > [...]
> > $ grep MODULES .config
> > CONFIG_MODULES_USE_ELF_RELA=y
> > # CONFIG_MODULES is not set
> > $
> 
> Otherwise, I have no problem merging this series.

Good, thanks!

> I'm just curious what
> to do with the allmodconfig with KCONFIG_ALLCONFIG bug.

Working on it! ;-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-06 Thread Yann E. MORIN
Michal, All,

On 2013-09-05 11:38 +0200, Michal Marek spake thusly:
> On 3.9.2013 23:04, Yann E. MORIN wrote:
> > From: "Yann E. MORIN" 
> > 
> > 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.
> 
> Wasn't this change supposed to fix allmodconfig with KCONFIG_ALLCONFIG
> (http://lkml.org/lkml/2013/8/8/573)? Or is there still more to do?

This is part of the fix, and there are still things to change, yes.

I'm not done with it yet, since I was unavailable for some time, and I
just wanted this part to be reviewed/upstreamed before continuing, just
in case I was going the wrong way.

I'll be further working on this, and hope to have something at the
beginning of next week.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-06 Thread Yann E. MORIN
Michal, All,

On 2013-09-05 11:38 +0200, Michal Marek spake thusly:
 On 3.9.2013 23:04, Yann E. MORIN wrote:
  From: Yann E. MORIN yann.morin.1...@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.
 
 Wasn't this change supposed to fix allmodconfig with KCONFIG_ALLCONFIG
 (http://lkml.org/lkml/2013/8/8/573)? Or is there still more to do?

This is part of the fix, and there are still things to change, yes.

I'm not done with it yet, since I was unavailable for some time, and I
just wanted this part to be reviewed/upstreamed before continuing, just
in case I was going the wrong way.

I'll be further working on this, and hope to have something at the
beginning of next week.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-06 Thread Yann E. MORIN
Michal, All,

On 2013-09-05 12:02 +0200, Michal Marek spake thusly:
 On 5.9.2013 11:38, Michal Marek wrote:
  On 3.9.2013 23:04, Yann E. MORIN wrote:
  From: Yann E. MORIN yann.morin.1...@free.fr
  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.
  
  Wasn't this change supposed to fix allmodconfig with KCONFIG_ALLCONFIG
  (http://lkml.org/lkml/2013/8/8/573)? Or is there still more to do?
  Because I'm still getting:
  [...]
  $ grep MODULES .config
  CONFIG_MODULES_USE_ELF_RELA=y
  # CONFIG_MODULES is not set
  $
 
 Otherwise, I have no problem merging this series.

Good, thanks!

 I'm just curious what
 to do with the allmodconfig with KCONFIG_ALLCONFIG bug.

Working on it! ;-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/3] kconfig: do not allow more than one symbol to have 'option modules'

2013-09-04 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Previously, it was possible to have more than one symbol with the
'option modules' attached to them, although only the last one would
in fact control tristates.

Since this does not make much sense, only allow at most one symbol to
control tristates.

Note: it is still possible to have more than one symbol that control
tristates, but indirectly:

config MOD1
bool "mod1"
select MODULES
config MOD2
bool "mod2"
select MODULES
config MODULES
bool
option modules

Signed-off-by: "Yann E. MORIN" 
Cc: Sam Ravnborg 
Cc: Michal Marek 
---
 Documentation/kbuild/kconfig-language.txt | 1 +
 scripts/kconfig/menu.c| 6 ++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/kbuild/kconfig-language.txt 
b/Documentation/kbuild/kconfig-language.txt
index c858f84..c420676 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -147,6 +147,7 @@ applicable everywhere (see syntax).
   - "modules"
 This declares the symbol to be used as the MODULES symbol, which
 enables the third modular state for all config symbols.
+At most one symbol may have the "modules" option set.
 
   - "env"=
 This imports the environment variable into Kconfig. It behaves like
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3a9c674..c1d5320 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
 {
switch (token) {
case T_OPT_MODULES:
+   if (modules_sym)
+   zconf_error("symbol '%s' redefines option 'modules'"
+   " already defined by symbol '%s'",
+   current_entry->sym->name,
+   modules_sym->name
+   );
modules_sym = current_entry->sym;
break;
case T_OPT_DEFCONFIG_LIST:
-- 
1.8.1.2

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


[PATCH 2/3] kconfig: regenerate bison parser

2013-09-04 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Regenerate bison parser after changes made in:
b1a4fe3: kconfig: do not special-case 'MODULES' symbol

Signed-off-by: "Yann E. MORIN" 
Cc: Sam Ravnborg 
Cc: Michal Marek 
---
 scripts/kconfig/zconf.tab.c_shipped | 562 +++-
 1 file changed, 298 insertions(+), 264 deletions(-)

diff --git a/scripts/kconfig/zconf.tab.c_shipped 
b/scripts/kconfig/zconf.tab.c_shipped
index f636141..25ae16a 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C

-  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+  Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -302,11 +301,11 @@ YYID (yyi)
 #define alloca _alloca
 #   else
 #define YYSTACK_ALLOC alloca
-#if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || 
defined __C99__FUNC__ \
+#if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 # include  /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-#  define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+#  define EXIT_SUCCESS 0
 # endif
 #endif
 #   endif
@@ -329,24 +328,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
 && (defined YYFREE || defined free)))
 #   include  /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -375,23 +374,7 @@ union yyalloc
  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
   + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count) \
-  do   \
-   {   \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++)   \
-   (To)[yyi] = (From)[yyi];\
-   }   \
-  while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -411,6 +394,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count) \
+  do   \
+   {   \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++)   \
+   (To)[yyi] = (From)[yyi];\
+   }   \
+  while (YYID (0))
+#  endi

[PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-04 Thread Yann E. MORIN
From: "Yann E. MORIN" 

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" 
Cc: Sam Ravnborg 
Cc: Michal Marek 
---
 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

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


[pull request] Pull request for branch yem/kconfig-for-next

2013-09-04 Thread Yann E. MORIN
From: "Yann E. MORIN" 

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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/3] kconfig: regenerate bison parser

2013-09-04 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Regenerate bison parser after changes made in:
b1a4fe3: kconfig: do not special-case 'MODULES' symbol

Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@suse.cz
---
 scripts/kconfig/zconf.tab.c_shipped | 562 +++-
 1 file changed, 298 insertions(+), 264 deletions(-)

diff --git a/scripts/kconfig/zconf.tab.c_shipped 
b/scripts/kconfig/zconf.tab.c_shipped
index f636141..25ae16a 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C

-  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+  Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION 2.4.3
+#define YYBISON_VERSION 2.5
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME yacc.c
@@ -302,11 +301,11 @@ YYID (yyi)
 #define alloca _alloca
 #   else
 #define YYSTACK_ALLOC alloca
-#if ! defined _ALLOCA_H  ! defined _STDLIB_H  (defined __STDC__ || 
defined __C99__FUNC__ \
+#if ! defined _ALLOCA_H  ! defined EXIT_SUCCESS  (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 # include stdlib.h /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-#  define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+#  define EXIT_SUCCESS 0
 # endif
 #endif
 #   endif
@@ -329,24 +328,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus  ! defined _STDLIB_H \
+#  if (defined __cplusplus  ! defined EXIT_SUCCESS \
 ! ((defined YYMALLOC || defined malloc) \
  (defined YYFREE || defined free)))
 #   include stdlib.h /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc  ! defined _STDLIB_H  (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined malloc  ! defined EXIT_SUCCESS  (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free  ! defined _STDLIB_H  (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined free  ! defined EXIT_SUCCESS  (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -375,23 +374,7 @@ union yyalloc
  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
   + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__  1  __GNUC__
-#   define YYCOPY(To, From, Count) \
-  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count) \
-  do   \
-   {   \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi  (Count); yyi++)   \
-   (To)[yyi] = (From)[yyi];\
-   }   \
-  while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -411,6 +394,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED  YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__  1  __GNUC__
+#   define YYCOPY(To, From, Count) \
+  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count) \
+  do   \
+   {   \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi  (Count); yyi++)   \
+   (To)[yyi] = (From)[yyi];\
+   }   \
+  while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  11
 /* YYLAST -- Last index in YYTABLE.  */
@@ -529,18

[PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-04 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@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.1...@free.fr
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@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

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


[pull request] Pull request for branch yem/kconfig-for-next

2013-09-04 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/3] kconfig: do not allow more than one symbol to have 'option modules'

2013-09-04 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Previously, it was possible to have more than one symbol with the
'option modules' attached to them, although only the last one would
in fact control tristates.

Since this does not make much sense, only allow at most one symbol to
control tristates.

Note: it is still possible to have more than one symbol that control
tristates, but indirectly:

config MOD1
bool mod1
select MODULES
config MOD2
bool mod2
select MODULES
config MODULES
bool
option modules

Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@suse.cz
---
 Documentation/kbuild/kconfig-language.txt | 1 +
 scripts/kconfig/menu.c| 6 ++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/kbuild/kconfig-language.txt 
b/Documentation/kbuild/kconfig-language.txt
index c858f84..c420676 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -147,6 +147,7 @@ applicable everywhere (see syntax).
   - modules
 This declares the symbol to be used as the MODULES symbol, which
 enables the third modular state for all config symbols.
+At most one symbol may have the modules option set.
 
   - env=value
 This imports the environment variable into Kconfig. It behaves like
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3a9c674..c1d5320 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
 {
switch (token) {
case T_OPT_MODULES:
+   if (modules_sym)
+   zconf_error(symbol '%s' redefines option 'modules'
+already defined by symbol '%s',
+   current_entry-sym-name,
+   modules_sym-name
+   );
modules_sym = current_entry-sym;
break;
case T_OPT_DEFCONFIG_LIST:
-- 
1.8.1.2

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


Re: [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-03 Thread Yann E. MORIN
Michal, All,

On 2013-09-03 23:04 +0200, Yann E. MORIN spake thusly:
> 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.

Doh... I forgot to send an intro mail first. Seems holidays really were
a good break! :-)

Anyway, this series might be a bit late to go in for 3.12, but it has
previously been discussed with you and Sam.

If you feel it's too touchy for 3.12, then I believe it can easily wait
for 3.13.

If you want it for 3.12, I can send a pull-request if that's easier for
you.

Regards,
Yann E. MORIN.

-- 
.-.----.------..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/3] kconfig: do not allow more than one symbol to have 'option modules'

2013-09-03 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Previously, it was possible to have more than one symbol with the
'option modules' attached to them, although only the last one would
in fact controls tristates.

Since this does not make much sense, only allow at most one symbol to
control tristates.

Note: it is still possible to have more than one symbol that control
tristates, but indirectly:

config MOD1
bool "mod1"
select MODULES
config MOD2
bool "mod2"
select MODULES
config MODULES
bool
option modules

Signed-off-by: "Yann E. MORIN" 
Cc: Sam Ravnborg 
Cc: Michal Marek 
---
 Documentation/kbuild/kconfig-language.txt | 1 +
 scripts/kconfig/menu.c| 6 ++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/kbuild/kconfig-language.txt 
b/Documentation/kbuild/kconfig-language.txt
index c858f84..c420676 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -147,6 +147,7 @@ applicable everywhere (see syntax).
   - "modules"
 This declares the symbol to be used as the MODULES symbol, which
 enables the third modular state for all config symbols.
+At most one symbol may have the "modules" option set.
 
   - "env"=
 This imports the environment variable into Kconfig. It behaves like
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3a9c674..c1d5320 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
 {
switch (token) {
case T_OPT_MODULES:
+   if (modules_sym)
+   zconf_error("symbol '%s' redefines option 'modules'"
+   " already defined by symbol '%s'",
+   current_entry->sym->name,
+   modules_sym->name
+   );
modules_sym = current_entry->sym;
break;
case T_OPT_DEFCONFIG_LIST:
-- 
1.8.1.2

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


[PATCH 2/3] kconfig: regenerate bison parser

2013-09-03 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Regenerate bison parser after changes made in:
b1a4fe3: kconfig: do not special-case 'MODULES' symbol

Signed-off-by: "Yann E. MORIN" 
Cc: Sam Ravnborg 
Cc: Michal Marek 
---
 scripts/kconfig/zconf.tab.c_shipped | 562 +++-
 1 file changed, 298 insertions(+), 264 deletions(-)

diff --git a/scripts/kconfig/zconf.tab.c_shipped 
b/scripts/kconfig/zconf.tab.c_shipped
index f636141..25ae16a 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C

-  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+  Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.5"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -302,11 +301,11 @@ YYID (yyi)
 #define alloca _alloca
 #   else
 #define YYSTACK_ALLOC alloca
-#if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || 
defined __C99__FUNC__ \
+#if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 # include  /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-#  define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+#  define EXIT_SUCCESS 0
 # endif
 #endif
 #   endif
@@ -329,24 +328,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
 && (defined YYFREE || defined free)))
 #   include  /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -375,23 +374,7 @@ union yyalloc
  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
   + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count) \
-  do   \
-   {   \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++)   \
-   (To)[yyi] = (From)[yyi];\
-   }   \
-  while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -411,6 +394,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count) \
+  do   \
+   {   \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++)   \
+   (To)[yyi] = (From)[yyi];\
+   }   \
+  while (YYID (0))
+#  endi

[PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-03 Thread Yann E. MORIN
From: "Yann E. MORIN" 

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" 
Cc: Sam Ravnborg 
Cc: Michal Marek 
---
 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

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


[PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-03 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@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.1...@free.fr
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@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

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


[PATCH 2/3] kconfig: regenerate bison parser

2013-09-03 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Regenerate bison parser after changes made in:
b1a4fe3: kconfig: do not special-case 'MODULES' symbol

Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@suse.cz
---
 scripts/kconfig/zconf.tab.c_shipped | 562 +++-
 1 file changed, 298 insertions(+), 264 deletions(-)

diff --git a/scripts/kconfig/zconf.tab.c_shipped 
b/scripts/kconfig/zconf.tab.c_shipped
index f636141..25ae16a 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C

-  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2009, 2010 Free Software Foundation, Inc.
+  Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION 2.4.3
+#define YYBISON_VERSION 2.5
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME yacc.c
@@ -302,11 +301,11 @@ YYID (yyi)
 #define alloca _alloca
 #   else
 #define YYSTACK_ALLOC alloca
-#if ! defined _ALLOCA_H  ! defined _STDLIB_H  (defined __STDC__ || 
defined __C99__FUNC__ \
+#if ! defined _ALLOCA_H  ! defined EXIT_SUCCESS  (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 # include stdlib.h /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-#  define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+#  define EXIT_SUCCESS 0
 # endif
 #endif
 #   endif
@@ -329,24 +328,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus  ! defined _STDLIB_H \
+#  if (defined __cplusplus  ! defined EXIT_SUCCESS \
 ! ((defined YYMALLOC || defined malloc) \
  (defined YYFREE || defined free)))
 #   include stdlib.h /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc  ! defined _STDLIB_H  (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined malloc  ! defined EXIT_SUCCESS  (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free  ! defined _STDLIB_H  (defined __STDC__ || defined 
__C99__FUNC__ \
+#   if ! defined free  ! defined EXIT_SUCCESS  (defined __STDC__ || 
defined __C99__FUNC__ \
  || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -375,23 +374,7 @@ union yyalloc
  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
   + YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__  1  __GNUC__
-#   define YYCOPY(To, From, Count) \
-  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count) \
-  do   \
-   {   \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi  (Count); yyi++)   \
-   (To)[yyi] = (From)[yyi];\
-   }   \
-  while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -411,6 +394,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED  YYCOPY_NEEDED
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__  1  __GNUC__
+#   define YYCOPY(To, From, Count) \
+  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count) \
+  do   \
+   {   \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi  (Count); yyi++)   \
+   (To)[yyi] = (From)[yyi];\
+   }   \
+  while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  11
 /* YYLAST -- Last index in YYTABLE.  */
@@ -529,18

[PATCH 3/3] kconfig: do not allow more than one symbol to have 'option modules'

2013-09-03 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Previously, it was possible to have more than one symbol with the
'option modules' attached to them, although only the last one would
in fact controls tristates.

Since this does not make much sense, only allow at most one symbol to
control tristates.

Note: it is still possible to have more than one symbol that control
tristates, but indirectly:

config MOD1
bool mod1
select MODULES
config MOD2
bool mod2
select MODULES
config MODULES
bool
option modules

Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@suse.cz
---
 Documentation/kbuild/kconfig-language.txt | 1 +
 scripts/kconfig/menu.c| 6 ++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/kbuild/kconfig-language.txt 
b/Documentation/kbuild/kconfig-language.txt
index c858f84..c420676 100644
--- a/Documentation/kbuild/kconfig-language.txt
+++ b/Documentation/kbuild/kconfig-language.txt
@@ -147,6 +147,7 @@ applicable everywhere (see syntax).
   - modules
 This declares the symbol to be used as the MODULES symbol, which
 enables the third modular state for all config symbols.
+At most one symbol may have the modules option set.
 
   - env=value
 This imports the environment variable into Kconfig. It behaves like
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3a9c674..c1d5320 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -199,6 +199,12 @@ void menu_add_option(int token, char *arg)
 {
switch (token) {
case T_OPT_MODULES:
+   if (modules_sym)
+   zconf_error(symbol '%s' redefines option 'modules'
+already defined by symbol '%s',
+   current_entry-sym-name,
+   modules_sym-name
+   );
modules_sym = current_entry-sym;
break;
case T_OPT_DEFCONFIG_LIST:
-- 
1.8.1.2

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


Re: [PATCH 1/3] kconfig: do not special-case 'MODULES' symbol

2013-09-03 Thread Yann E. MORIN
Michal, All,

On 2013-09-03 23:04 +0200, Yann E. MORIN spake thusly:
 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.

Doh... I forgot to send an intro mail first. Seems holidays really were
a good break! :-)

Anyway, this series might be a bit late to go in for 3.12, but it has
previously been discussed with you and Sam.

If you feel it's too touchy for 3.12, then I believe it can easily wait
for 3.13.

If you want it for 3.12, I can send a pull-request if that's easier for
you.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-16 Thread Yann E. MORIN
Sam, Michal, All,

On 2013-08-16 19:14 +0200, Sam Ravnborg spake thusly:
> On Fri, Aug 16, 2013 at 03:10:38PM +0200, Michal Marek wrote:
> > On 11.8.2013 23:39, Yann E. MORIN wrote:
> > > On 2013-08-09 13:42 +0200, Sam Ravnborg spake thusly:
> > >> If we drop the special handling of "MODULES" and introduced
> > >> the following in we may fix it - hopefully:
> > >>
> > >> config MODULES
> > >>  option modules
> > >>
> > >> The option handling is already in place. It is even documented :-)
> > > 
> > > Yes, indeed, that one is pretty easy! :-)
> > > 
> > >> At least we could then drop the sym_lookup here (zconf.y):
> > >> if (!modules_sym->prop) {
> > >> struct property *prop;
> > >>
> > >> prop = prop_alloc(P_DEFAULT, modules_sym);
> > >> prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
> > >> }
> > >> Without the sym_lookup I think the symbol will not be defined and tus 
> > >> not marked valid.
> > > 
> > > Sorry, I don't understand what we should do here.
> > > 
> > > From what I understand, here's what happens:
> > >   - there's no symbol that declared the 'modules' option, so the
> > > modules_sym->prop is NULL;
> > >   - so we look for the symbol 'MODULES' and use that as the symbol used
> > > to evaluate if tristates are enabled.
> > > 
> > > So, now we have 'option modules' added to MODULES, we never enter this
> > > if() condition.
> > > 
> > > But what would happen to other projects that do not have a symbol set
> > > with 'option modules' and no 'MODULES' symbol? Surely, those projects do
> > > not need tristates, but what should the code do in this case?
> > > 
> > > So, I don't know what to replace this 'sym_lookup("MODULES", 0)' with.
> > 
> > If the Kconfig files do not provide any symbol with 'option modules',
> > then set modules_sym to a dummy bool with the value 'n'?
> This is my thinking too - to use the symbol "n".
> But I wanted to try it out - but so far have not had time for it.

OK, I'll tackle this. Thanks for the info. :-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [pull request] Pull request for branch yem/kconfig-for-next

2013-08-16 Thread Yann E. MORIN
Michal, All,

On Friday 16 August 2013 14:48:47 Michal Marek wrote:
> On 15.8.2013 23:17, Yann E. MORIN wrote:
> > From: "Yann E. MORIN" 
> > 
> > Hello Michal,
> > 
> > Please pull a few more changes queued for 3.12 since your last pull:
> > 
> >   - POSIX compliance when using sed in scripts/config(CLément)
> >   - use 'long long' to represent hex and ranges, so their width
> > is not dependent on the architecture (32/64 bits)(Kees)
> >   - remove the warning when parsing auto.conf, that frigthened
> > Linus when he merged the ext4 tree
> >   - explicit use CONFIG_MODULES to enable tristates
> 
> Pulled, thanks! Now you can remove the CONFIG_MODULES special handling
> from kconfig.

Eh! Easier said than done! ;-)

Thanks!

Regards,
Yann E. MORIN.

-- 
.-----..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --==< O_o >==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|  """  conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [pull request] Pull request for branch yem/kconfig-for-next

2013-08-16 Thread Yann E. MORIN
Michal, All,

On Friday 16 August 2013 14:48:47 Michal Marek wrote:
 On 15.8.2013 23:17, Yann E. MORIN wrote:
  From: Yann E. MORIN yann.morin.1...@free.fr
  
  Hello Michal,
  
  Please pull a few more changes queued for 3.12 since your last pull:
  
- POSIX compliance when using sed in scripts/config(CLément)
- use 'long long' to represent hex and ranges, so their width
  is not dependent on the architecture (32/64 bits)(Kees)
- remove the warning when parsing auto.conf, that frigthened
  Linus when he merged the ext4 tree
- explicit use CONFIG_MODULES to enable tristates
 
 Pulled, thanks! Now you can remove the CONFIG_MODULES special handling
 from kconfig.

Eh! Easier said than done! ;-)

Thanks!

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --== O_o ==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-16 Thread Yann E. MORIN
Sam, Michal, All,

On 2013-08-16 19:14 +0200, Sam Ravnborg spake thusly:
 On Fri, Aug 16, 2013 at 03:10:38PM +0200, Michal Marek wrote:
  On 11.8.2013 23:39, Yann E. MORIN wrote:
   On 2013-08-09 13:42 +0200, Sam Ravnborg spake thusly:
   If we drop the special handling of MODULES and introduced
   the following in we may fix it - hopefully:
  
   config MODULES
option modules
  
   The option handling is already in place. It is even documented :-)
   
   Yes, indeed, that one is pretty easy! :-)
   
   At least we could then drop the sym_lookup here (zconf.y):
   if (!modules_sym-prop) {
   struct property *prop;
  
   prop = prop_alloc(P_DEFAULT, modules_sym);
   prop-expr = expr_alloc_symbol(sym_lookup(MODULES, 0));
   }
   Without the sym_lookup I think the symbol will not be defined and tus 
   not marked valid.
   
   Sorry, I don't understand what we should do here.
   
   From what I understand, here's what happens:
 - there's no symbol that declared the 'modules' option, so the
   modules_sym-prop is NULL;
 - so we look for the symbol 'MODULES' and use that as the symbol used
   to evaluate if tristates are enabled.
   
   So, now we have 'option modules' added to MODULES, we never enter this
   if() condition.
   
   But what would happen to other projects that do not have a symbol set
   with 'option modules' and no 'MODULES' symbol? Surely, those projects do
   not need tristates, but what should the code do in this case?
   
   So, I don't know what to replace this 'sym_lookup(MODULES, 0)' with.
  
  If the Kconfig files do not provide any symbol with 'option modules',
  then set modules_sym to a dummy bool with the value 'n'?
 This is my thinking too - to use the symbol n.
 But I wanted to try it out - but so far have not had time for it.

OK, I'll tackle this. Thanks for the info. :-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/4] scripts/config: use sed's POSIX interface

2013-08-15 Thread Yann E. MORIN
From: Clement Chauplannaz 

Script `config' relies on extensions of `GNU sed', and is thus not
working on all Unixes:
  - in-place edition of files (-i), which can be replaced with
a temporary file;
  - extended-regexps (-r), which can be split into basic regexps;
  - single-line calls to `a' command, while some implementations
require a leading newline before the parameter.

Rewrite calls to `sed' to comply with POSIX interface, and move them
to helper functions.

Signed-off-by: Clement Chauplannaz 
Tested-by: "Yann E. MORIN" 
Reviewed-by: "Yann E. MORIN" 
Signed-off-by: Yann E. MORIN 
---
 scripts/config | 44 +---
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/scripts/config b/scripts/config
index 567120a..2283be2 100755
--- a/scripts/config
+++ b/scripts/config
@@ -62,15 +62,52 @@ checkarg() {
fi
 }
 
+txt_append() {
+   local anchor="$1"
+   local insert="$2"
+   local infile="$3"
+   local tmpfile="$infile.swp"
+
+   # sed append cmd: 'a\' + newline + text + newline
+   cmd="$(printf "a\\%b$insert" "\n")"
+
+   sed -e "/$anchor/$cmd" "$infile" >"$tmpfile"
+   # replace original file with the edited one
+   mv "$tmpfile" "$infile"
+}
+
+txt_subst() {
+   local before="$1"
+   local after="$2"
+   local infile="$3"
+   local tmpfile="$infile.swp"
+
+   sed -e "s/$before/$after/" "$infile" >"$tmpfile"
+   # replace original file with the edited one
+   mv "$tmpfile" "$infile"
+}
+
+txt_delete() {
+   local text="$1"
+   local infile="$2"
+   local tmpfile="$infile.swp"
+
+   sed -e "/$text/d" "$infile" >"$tmpfile"
+   # replace original file with the edited one
+   mv "$tmpfile" "$infile"
+}
+
 set_var() {
local name=$1 new=$2 before=$3
 
name_re="^($name=|# $name is not set)"
before_re="^($before=|# $before is not set)"
if test -n "$before" && grep -Eq "$before_re" "$FN"; then
-   sed -ri "/$before_re/a $new" "$FN"
+   txt_append "^$before=" "$new" "$FN"
+   txt_append "^# $before is not set" "$new" "$FN"
elif grep -Eq "$name_re" "$FN"; then
-   sed -ri "s:$name_re.*:$new:" "$FN"
+   txt_subst "^$name=.*" "$new" "$FN"
+   txt_subst "^# $name is not set" "$new" "$FN"
else
echo "$new" >>"$FN"
fi
@@ -79,7 +116,8 @@ set_var() {
 undef_var() {
local name=$1
 
-   sed -ri "/^($name=|# $name is not set)/d" "$FN"
+   txt_delete "^$name=" "$FN"
+   txt_delete "^# $name is not set" "$FN"
 }
 
 if [ "$1" = "--file" ]; then
-- 
1.8.1.2

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


[PATCH 1/4] kconfig: switch to "long long" for sanity

2013-08-15 Thread Yann E. MORIN
From: Kees Cook 

Instead of using "long" for kconfig "hex" and "range" values, which may
change in size depending on the host architecture, use "long long". This
will allow values greater than INT_MAX on 32-bit hosts when cross
compiling.

Signed-off-by: Kees Cook 
Acked-by: Geert Uytterhoeven 
Tested-by: "Yann E. MORIN" 
Signed-off-by: "Yann E. MORIN" 
---
 scripts/kconfig/symbol.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index a76b8fd..c9a6775 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -136,7 +136,7 @@ static struct property *sym_get_range_prop(struct symbol 
*sym)
return NULL;
 }
 
-static long sym_get_range_val(struct symbol *sym, int base)
+static long long sym_get_range_val(struct symbol *sym, int base)
 {
sym_calc_value(sym);
switch (sym->type) {
@@ -149,13 +149,14 @@ static long sym_get_range_val(struct symbol *sym, int 
base)
default:
break;
}
-   return strtol(sym->curr.val, NULL, base);
+   return strtoll(sym->curr.val, NULL, base);
 }
 
 static void sym_validate_range(struct symbol *sym)
 {
struct property *prop;
-   long base, val, val2;
+   int base;
+   long long val, val2;
char str[64];
 
switch (sym->type) {
@@ -171,7 +172,7 @@ static void sym_validate_range(struct symbol *sym)
prop = sym_get_range_prop(sym);
if (!prop)
return;
-   val = strtol(sym->curr.val, NULL, base);
+   val = strtoll(sym->curr.val, NULL, base);
val2 = sym_get_range_val(prop->expr->left.sym, base);
if (val >= val2) {
val2 = sym_get_range_val(prop->expr->right.sym, base);
@@ -179,9 +180,9 @@ static void sym_validate_range(struct symbol *sym)
return;
}
if (sym->type == S_INT)
-   sprintf(str, "%ld", val2);
+   sprintf(str, "%lld", val2);
else
-   sprintf(str, "0x%lx", val2);
+   sprintf(str, "0x%llx", val2);
sym->curr.val = strdup(str);
 }
 
@@ -594,7 +595,7 @@ bool sym_string_valid(struct symbol *sym, const char *str)
 bool sym_string_within_range(struct symbol *sym, const char *str)
 {
struct property *prop;
-   long val;
+   long long val;
 
switch (sym->type) {
case S_STRING:
@@ -605,7 +606,7 @@ bool sym_string_within_range(struct symbol *sym, const char 
*str)
prop = sym_get_range_prop(sym);
if (!prop)
return true;
-   val = strtol(str, NULL, 10);
+   val = strtoll(str, NULL, 10);
return val >= sym_get_range_val(prop->expr->left.sym, 10) &&
   val <= sym_get_range_val(prop->expr->right.sym, 10);
case S_HEX:
@@ -614,7 +615,7 @@ bool sym_string_within_range(struct symbol *sym, const char 
*str)
prop = sym_get_range_prop(sym);
if (!prop)
return true;
-   val = strtol(str, NULL, 16);
+   val = strtoll(str, NULL, 16);
return val >= sym_get_range_val(prop->expr->left.sym, 16) &&
   val <= sym_get_range_val(prop->expr->right.sym, 16);
case S_BOOLEAN:
-- 
1.8.1.2

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


[PATCH 3/4] kconfig: silence warning when parsing auto.conf when a symbol has changed type

2013-08-15 Thread Yann E. MORIN
From: "Yann E. MORIN" 

When a symbol changes type from tristate to bool, and was previously set to
'm', a subsequent silentoldconfig would warn about inconsistency, such as:

include/config/auto.conf:3014:warning: symbol value 'm' invalid for
HOTPLUG_PCI_PCIE

Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
git checkout 1fe0135
make mrproper
make allmodconfig
make silentoldconfig
git checkout aa8032b
make allmodconfig
make silentoldconfig

Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
but then was set to 'y' by the second allmodconfig. Then the second
silentoldconfig prints the warning.

The warning in this case is a spurious warning, which happens at the time
kconfig tries to detect symbols that have changed, to touch the empty
header files in include/config used for dependency-tracking by make.

Silence the warning when we read the old auto.conf file, since it is
perfectly legit that a symbol changed type since the previous call.

Thread in:
http://marc.info/?l=linux-pci=137569198904000=2

Reported-by: Linus Torvalds 
Signed-off-by: "Yann E. MORIN" 
Cc: Linus Torvalds 
Cc: Michal Marek 
Cc: Thomas Petazzoni 
Cc: Bjorn Helgaas 
Cc: Yinghai Lu 
Cc: Benjamin Herrenschmidt 
---
 scripts/kconfig/confdata.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c55c227..87f7238 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -140,7 +140,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym->flags |= def_flags;
break;
}
-   conf_warning("symbol value '%s' invalid for %s", p, sym->name);
+   if (def != S_DEF_AUTO)
+   conf_warning("symbol value '%s' invalid for %s",
+p, sym->name);
return 1;
case S_OTHER:
if (*p != '"') {
@@ -161,7 +163,8 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
memmove(p2, p2 + 1, strlen(p2));
}
if (!p2) {
-   conf_warning("invalid string found");
+   if (def != S_DEF_AUTO)
+   conf_warning("invalid string found");
return 1;
}
/* fall through */
@@ -172,7 +175,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym->def[def].val = strdup(p);
sym->flags |= def_flags;
} else {
-   conf_warning("symbol value '%s' invalid for %s", p, 
sym->name);
+   if (def != S_DEF_AUTO)
+   conf_warning("symbol value '%s' invalid for %s",
+p, sym->name);
return 1;
}
break;
-- 
1.8.1.2

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


[pull request] Pull request for branch yem/kconfig-for-next

2013-08-15 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Hello Michal,

Please pull a few more changes queued for 3.12 since your last pull:

  - POSIX compliance when using sed in scripts/config(CLément)
  - use 'long long' to represent hex and ranges, so their width
is not dependent on the architecture (32/64 bits)(Kees)
  - remove the warning when parsing auto.conf, that frigthened
Linus when he merged the ext4 tree
  - explicit use CONFIG_MODULES to enable tristates

Regards,
Yann E. MORIN.

PS. I've indeed changed the naming scheme of my branches, don't worry. ;-)


The following changes since commit c3286ee337b0586a8ae2b4f13c33e3de5d71139e:

  Merge branch 'yem-kconfig-rc-fixes' of 
git://gitorious.org/linux-kconfig/linux-kconfig into kbuild/kconfig (2013-07-23 
15:57:17 +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 11097a0367e48954ecf616f9b0df48d86835dd0d:

  modules: do not depend on kconfig to set 'modules' option to symbol MODULES 
(2013-08-15 22:56:08 +0200)


Clement Chauplannaz (1):
  scripts/config: use sed's POSIX interface

Kees Cook (1):
  kconfig: switch to "long long" for sanity

Yann E. MORIN (2):
  kconfig: silence warning when parsing auto.conf when a symbol has changed 
type
  modules: do not depend on kconfig to set 'modules' option to symbol 
MODULES

 init/Kconfig   |  1 +
 scripts/config | 44 +---
 scripts/kconfig/confdata.c | 11 ---
 scripts/kconfig/symbol.c   | 19 ++-
 4 files changed, 60 insertions(+), 15 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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/4] modules: do not depend on kconfig to set 'modules' option to symbol MODULES

2013-08-15 Thread Yann E. MORIN
From: "Yann E. MORIN" 

Currently, the MODULES symbol is special-cased in different places in the
kconfig language. For example, if no symbol is defined to enable tristates,
then kconfig looks up for a symbol named 'MODULES', and forces the 'modules'
option onto that symbol.

This causes problems as such:
  - since MODULES is special-cased, reading the configuration with
KCONFIG_ALLCONFIG set will forcibly set MODULES to be 'valid' (ie.
it has a valid value), when no such value was previously set. So
MODULES defaults to 'n' unless it is present in KCONFIG_ALLCONFIG
  - other third-party projects may decide that 'MODULES' plays a different
role for them

This has been exposed by cset #cfa98f2e:
kconfig: do not override symbols already set
and reported by Stephen in:
http://marc.info/?l=linux-next=137592137915234=2

As suggested by Sam, we explicitly define the MODULES symbol to be the
tristate-enabler. This will allow us to drop special-casing of MODULES
in the kconfig language, later.

(Note: this patch is not a fix to Stephen's issue, just a first step).

Reported-by: Stephen Rothwell 
Signed-off-by: yann.morin.1...@free.fr
Cc: Stephen Rothwell 
Cc: Sam Ravnborg 
Cc: Michal Marek 
Cc: Kevin Hilman 
Cc: sedat.di...@gmail.com
Cc: Theodore Ts'o 
---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/init/Kconfig b/init/Kconfig
index 247084b..4d55e81 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1666,6 +1666,7 @@ config BASE_SMALL
 
 menuconfig MODULES
bool "Enable loadable module support"
+   option modules
help
  Kernel modules are small pieces of compiled code which can
  be inserted in the running kernel, rather than being
-- 
1.8.1.2

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


[pull request] Pull request for branch yem/kconfig-for-next

2013-08-15 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Hello Michal,

Please pull a few more changes queued for 3.12 since your last pull:

  - POSIX compliance when using sed in scripts/config(CLément)
  - use 'long long' to represent hex and ranges, so their width
is not dependent on the architecture (32/64 bits)(Kees)
  - remove the warning when parsing auto.conf, that frigthened
Linus when he merged the ext4 tree
  - explicit use CONFIG_MODULES to enable tristates

Regards,
Yann E. MORIN.

PS. I've indeed changed the naming scheme of my branches, don't worry. ;-)


The following changes since commit c3286ee337b0586a8ae2b4f13c33e3de5d71139e:

  Merge branch 'yem-kconfig-rc-fixes' of 
git://gitorious.org/linux-kconfig/linux-kconfig into kbuild/kconfig (2013-07-23 
15:57:17 +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 11097a0367e48954ecf616f9b0df48d86835dd0d:

  modules: do not depend on kconfig to set 'modules' option to symbol MODULES 
(2013-08-15 22:56:08 +0200)


Clement Chauplannaz (1):
  scripts/config: use sed's POSIX interface

Kees Cook (1):
  kconfig: switch to long long for sanity

Yann E. MORIN (2):
  kconfig: silence warning when parsing auto.conf when a symbol has changed 
type
  modules: do not depend on kconfig to set 'modules' option to symbol 
MODULES

 init/Kconfig   |  1 +
 scripts/config | 44 +---
 scripts/kconfig/confdata.c | 11 ---
 scripts/kconfig/symbol.c   | 19 ++-
 4 files changed, 60 insertions(+), 15 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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/4] modules: do not depend on kconfig to set 'modules' option to symbol MODULES

2013-08-15 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

Currently, the MODULES symbol is special-cased in different places in the
kconfig language. For example, if no symbol is defined to enable tristates,
then kconfig looks up for a symbol named 'MODULES', and forces the 'modules'
option onto that symbol.

This causes problems as such:
  - since MODULES is special-cased, reading the configuration with
KCONFIG_ALLCONFIG set will forcibly set MODULES to be 'valid' (ie.
it has a valid value), when no such value was previously set. So
MODULES defaults to 'n' unless it is present in KCONFIG_ALLCONFIG
  - other third-party projects may decide that 'MODULES' plays a different
role for them

This has been exposed by cset #cfa98f2e:
kconfig: do not override symbols already set
and reported by Stephen in:
http://marc.info/?l=linux-nextm=137592137915234w=2

As suggested by Sam, we explicitly define the MODULES symbol to be the
tristate-enabler. This will allow us to drop special-casing of MODULES
in the kconfig language, later.

(Note: this patch is not a fix to Stephen's issue, just a first step).

Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: yann.morin.1...@free.fr
Cc: Stephen Rothwell s...@canb.auug.org.au
Cc: Sam Ravnborg s...@ravnborg.org
Cc: Michal Marek mma...@suse.cz
Cc: Kevin Hilman khil...@linaro.org
Cc: sedat.di...@gmail.com
Cc: Theodore Ts'o ty...@mit.edu
---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/init/Kconfig b/init/Kconfig
index 247084b..4d55e81 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1666,6 +1666,7 @@ config BASE_SMALL
 
 menuconfig MODULES
bool Enable loadable module support
+   option modules
help
  Kernel modules are small pieces of compiled code which can
  be inserted in the running kernel, rather than being
-- 
1.8.1.2

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


[PATCH 1/4] kconfig: switch to long long for sanity

2013-08-15 Thread Yann E. MORIN
From: Kees Cook keesc...@chromium.org

Instead of using long for kconfig hex and range values, which may
change in size depending on the host architecture, use long long. This
will allow values greater than INT_MAX on 32-bit hosts when cross
compiling.

Signed-off-by: Kees Cook keesc...@chromium.org
Acked-by: Geert Uytterhoeven ge...@linux-m68k.org
Tested-by: Yann E. MORIN yann.morin.1...@free.fr
Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
---
 scripts/kconfig/symbol.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index a76b8fd..c9a6775 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -136,7 +136,7 @@ static struct property *sym_get_range_prop(struct symbol 
*sym)
return NULL;
 }
 
-static long sym_get_range_val(struct symbol *sym, int base)
+static long long sym_get_range_val(struct symbol *sym, int base)
 {
sym_calc_value(sym);
switch (sym-type) {
@@ -149,13 +149,14 @@ static long sym_get_range_val(struct symbol *sym, int 
base)
default:
break;
}
-   return strtol(sym-curr.val, NULL, base);
+   return strtoll(sym-curr.val, NULL, base);
 }
 
 static void sym_validate_range(struct symbol *sym)
 {
struct property *prop;
-   long base, val, val2;
+   int base;
+   long long val, val2;
char str[64];
 
switch (sym-type) {
@@ -171,7 +172,7 @@ static void sym_validate_range(struct symbol *sym)
prop = sym_get_range_prop(sym);
if (!prop)
return;
-   val = strtol(sym-curr.val, NULL, base);
+   val = strtoll(sym-curr.val, NULL, base);
val2 = sym_get_range_val(prop-expr-left.sym, base);
if (val = val2) {
val2 = sym_get_range_val(prop-expr-right.sym, base);
@@ -179,9 +180,9 @@ static void sym_validate_range(struct symbol *sym)
return;
}
if (sym-type == S_INT)
-   sprintf(str, %ld, val2);
+   sprintf(str, %lld, val2);
else
-   sprintf(str, 0x%lx, val2);
+   sprintf(str, 0x%llx, val2);
sym-curr.val = strdup(str);
 }
 
@@ -594,7 +595,7 @@ bool sym_string_valid(struct symbol *sym, const char *str)
 bool sym_string_within_range(struct symbol *sym, const char *str)
 {
struct property *prop;
-   long val;
+   long long val;
 
switch (sym-type) {
case S_STRING:
@@ -605,7 +606,7 @@ bool sym_string_within_range(struct symbol *sym, const char 
*str)
prop = sym_get_range_prop(sym);
if (!prop)
return true;
-   val = strtol(str, NULL, 10);
+   val = strtoll(str, NULL, 10);
return val = sym_get_range_val(prop-expr-left.sym, 10) 
   val = sym_get_range_val(prop-expr-right.sym, 10);
case S_HEX:
@@ -614,7 +615,7 @@ bool sym_string_within_range(struct symbol *sym, const char 
*str)
prop = sym_get_range_prop(sym);
if (!prop)
return true;
-   val = strtol(str, NULL, 16);
+   val = strtoll(str, NULL, 16);
return val = sym_get_range_val(prop-expr-left.sym, 16) 
   val = sym_get_range_val(prop-expr-right.sym, 16);
case S_BOOLEAN:
-- 
1.8.1.2

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


[PATCH 3/4] kconfig: silence warning when parsing auto.conf when a symbol has changed type

2013-08-15 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

When a symbol changes type from tristate to bool, and was previously set to
'm', a subsequent silentoldconfig would warn about inconsistency, such as:

include/config/auto.conf:3014:warning: symbol value 'm' invalid for
HOTPLUG_PCI_PCIE

Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
git checkout 1fe0135
make mrproper
make allmodconfig
make silentoldconfig
git checkout aa8032b
make allmodconfig
make silentoldconfig

Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
but then was set to 'y' by the second allmodconfig. Then the second
silentoldconfig prints the warning.

The warning in this case is a spurious warning, which happens at the time
kconfig tries to detect symbols that have changed, to touch the empty
header files in include/config used for dependency-tracking by make.

Silence the warning when we read the old auto.conf file, since it is
perfectly legit that a symbol changed type since the previous call.

Thread in:
http://marc.info/?l=linux-pcim=137569198904000w=2

Reported-by: Linus Torvalds torva...@linux-foundation.org
Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Linus Torvalds torva...@linux-foundation.org
Cc: Michal Marek mma...@suse.cz
Cc: Thomas Petazzoni thomas.petazz...@free-electrons.com
Cc: Bjorn Helgaas bhelg...@google.com
Cc: Yinghai Lu ying...@kernel.org
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
---
 scripts/kconfig/confdata.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c55c227..87f7238 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -140,7 +140,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym-flags |= def_flags;
break;
}
-   conf_warning(symbol value '%s' invalid for %s, p, sym-name);
+   if (def != S_DEF_AUTO)
+   conf_warning(symbol value '%s' invalid for %s,
+p, sym-name);
return 1;
case S_OTHER:
if (*p != '') {
@@ -161,7 +163,8 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
memmove(p2, p2 + 1, strlen(p2));
}
if (!p2) {
-   conf_warning(invalid string found);
+   if (def != S_DEF_AUTO)
+   conf_warning(invalid string found);
return 1;
}
/* fall through */
@@ -172,7 +175,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym-def[def].val = strdup(p);
sym-flags |= def_flags;
} else {
-   conf_warning(symbol value '%s' invalid for %s, p, 
sym-name);
+   if (def != S_DEF_AUTO)
+   conf_warning(symbol value '%s' invalid for %s,
+p, sym-name);
return 1;
}
break;
-- 
1.8.1.2

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


[PATCH 2/4] scripts/config: use sed's POSIX interface

2013-08-15 Thread Yann E. MORIN
From: Clement Chauplannaz chaup...@gmail.com

Script `config' relies on extensions of `GNU sed', and is thus not
working on all Unixes:
  - in-place edition of files (-i), which can be replaced with
a temporary file;
  - extended-regexps (-r), which can be split into basic regexps;
  - single-line calls to `a' command, while some implementations
require a leading newline before the parameter.

Rewrite calls to `sed' to comply with POSIX interface, and move them
to helper functions.

Signed-off-by: Clement Chauplannaz chaup...@gmail.com
Tested-by: Yann E. MORIN yann.morin.1...@free.fr
Reviewed-by: Yann E. MORIN yann.morin.1...@free.fr
Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
---
 scripts/config | 44 +---
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/scripts/config b/scripts/config
index 567120a..2283be2 100755
--- a/scripts/config
+++ b/scripts/config
@@ -62,15 +62,52 @@ checkarg() {
fi
 }
 
+txt_append() {
+   local anchor=$1
+   local insert=$2
+   local infile=$3
+   local tmpfile=$infile.swp
+
+   # sed append cmd: 'a\' + newline + text + newline
+   cmd=$(printf a\\%b$insert \n)
+
+   sed -e /$anchor/$cmd $infile $tmpfile
+   # replace original file with the edited one
+   mv $tmpfile $infile
+}
+
+txt_subst() {
+   local before=$1
+   local after=$2
+   local infile=$3
+   local tmpfile=$infile.swp
+
+   sed -e s/$before/$after/ $infile $tmpfile
+   # replace original file with the edited one
+   mv $tmpfile $infile
+}
+
+txt_delete() {
+   local text=$1
+   local infile=$2
+   local tmpfile=$infile.swp
+
+   sed -e /$text/d $infile $tmpfile
+   # replace original file with the edited one
+   mv $tmpfile $infile
+}
+
 set_var() {
local name=$1 new=$2 before=$3
 
name_re=^($name=|# $name is not set)
before_re=^($before=|# $before is not set)
if test -n $before  grep -Eq $before_re $FN; then
-   sed -ri /$before_re/a $new $FN
+   txt_append ^$before= $new $FN
+   txt_append ^# $before is not set $new $FN
elif grep -Eq $name_re $FN; then
-   sed -ri s:$name_re.*:$new: $FN
+   txt_subst ^$name=.* $new $FN
+   txt_subst ^# $name is not set $new $FN
else
echo $new $FN
fi
@@ -79,7 +116,8 @@ set_var() {
 undef_var() {
local name=$1
 
-   sed -ri /^($name=|# $name is not set)/d $FN
+   txt_delete ^$name= $FN
+   txt_delete ^# $name is not set $FN
 }
 
 if [ $1 = --file ]; then
-- 
1.8.1.2

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


Re: linux-next: build failure after merge of the ext4 tree

2013-08-11 Thread Yann E. MORIN
Sam, All,

On 2013-08-09 13:42 +0200, Sam Ravnborg spake thusly:
> On Thu, Aug 08, 2013 at 11:54:49PM +0200, Yann E. MORIN wrote:
> > Stephen, All,
> > 
> > On 2013-08-08 21:16 +0200, Yann E. MORIN spake thusly:
> > > On 2013-08-08 10:36 +1000, Stephen Rothwell spake thusly:
> > > > On Thu, 8 Aug 2013 10:22:28 +1000 Stephen Rothwell 
> > > > 
> > > > wrote:
> > > > >
> > > > > More quick testing with an empty file: v3.9 is OK, v3.10 gives
> > > > > CONFIG_MODULES unset.
> > > 
> > > Sorry, I don't understand the above. Can you elaborate on what you did,
> > > what you got, what expected, so I can try to reproduce and fix this,
> > > please?
> > 
> > Ok, I've had a look in the linux-next archives, and I think I got it.
> > Is the following right?
> > 
> > git clean -d; git clean -dX # To be sure tree is clean
> > touch empty
> > make KCONFIG_ALLCONFIG=empty allmodconfig
> > grep MODULES .config
> > $ CONFIG_MODULES is not set
> > 
> > If so, I think I found the reason: the modules symbol is _always_ set to
> > being valid as soon as KCONFIG_ALLCONFIG is read, even if it was not
> > present in that file.
> > 
> > Since it is set to be valid, the following change means it is not
> > affected another value later on.
> > 
> > So, I wonder what the best option is:
> >   1- revert the following, and find another solution,
> >   2- de-specialise the modules symbol,
> >   3- or further specialise the modules symbol.
> 
> If we drop the special handling of "MODULES" and introduced
> the following in we may fix it - hopefully:
> 
> config MODULES
>   option modules
> 
> The option handling is already in place. It is even documented :-)

Yes, indeed, that one is pretty easy! :-)

> At least we could then drop the sym_lookup here (zconf.y):
> if (!modules_sym->prop) {
> struct property *prop;
> 
> prop = prop_alloc(P_DEFAULT, modules_sym);
> prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
> }
> Without the sym_lookup I think the symbol will not be defined and tus not 
> marked valid.

Sorry, I don't understand what we should do here.

>From what I understand, here's what happens:
  - there's no symbol that declared the 'modules' option, so the
modules_sym->prop is NULL;
  - so we look for the symbol 'MODULES' and use that as the symbol used
to evaluate if tristates are enabled.

So, now we have 'option modules' added to MODULES, we never enter this
if() condition.

But what would happen to other projects that do not have a symbol set
with 'option modules' and no 'MODULES' symbol? Surely, those projects do
not need tristates, but what should the code do in this case?

So, I don't know what to replace this 'sym_lookup("MODULES", 0)' with.

> Soory - no patch as I am busy with day-time job stuff.

I hope you can share some guidnce here, please... ;-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-11 Thread Yann E. MORIN
Sam, All,

On 2013-08-09 13:42 +0200, Sam Ravnborg spake thusly:
 On Thu, Aug 08, 2013 at 11:54:49PM +0200, Yann E. MORIN wrote:
  Stephen, All,
  
  On 2013-08-08 21:16 +0200, Yann E. MORIN spake thusly:
   On 2013-08-08 10:36 +1000, Stephen Rothwell spake thusly:
On Thu, 8 Aug 2013 10:22:28 +1000 Stephen Rothwell 
s...@canb.auug.org.au
wrote:

 More quick testing with an empty file: v3.9 is OK, v3.10 gives
 CONFIG_MODULES unset.
   
   Sorry, I don't understand the above. Can you elaborate on what you did,
   what you got, what expected, so I can try to reproduce and fix this,
   please?
  
  Ok, I've had a look in the linux-next archives, and I think I got it.
  Is the following right?
  
  git clean -d; git clean -dX # To be sure tree is clean
  touch empty
  make KCONFIG_ALLCONFIG=empty allmodconfig
  grep MODULES .config
  $ CONFIG_MODULES is not set
  
  If so, I think I found the reason: the modules symbol is _always_ set to
  being valid as soon as KCONFIG_ALLCONFIG is read, even if it was not
  present in that file.
  
  Since it is set to be valid, the following change means it is not
  affected another value later on.
  
  So, I wonder what the best option is:
1- revert the following, and find another solution,
2- de-specialise the modules symbol,
3- or further specialise the modules symbol.
 
 If we drop the special handling of MODULES and introduced
 the following in we may fix it - hopefully:
 
 config MODULES
   option modules
 
 The option handling is already in place. It is even documented :-)

Yes, indeed, that one is pretty easy! :-)

 At least we could then drop the sym_lookup here (zconf.y):
 if (!modules_sym-prop) {
 struct property *prop;
 
 prop = prop_alloc(P_DEFAULT, modules_sym);
 prop-expr = expr_alloc_symbol(sym_lookup(MODULES, 0));
 }
 Without the sym_lookup I think the symbol will not be defined and tus not 
 marked valid.

Sorry, I don't understand what we should do here.

From what I understand, here's what happens:
  - there's no symbol that declared the 'modules' option, so the
modules_sym-prop is NULL;
  - so we look for the symbol 'MODULES' and use that as the symbol used
to evaluate if tristates are enabled.

So, now we have 'option modules' added to MODULES, we never enter this
if() condition.

But what would happen to other projects that do not have a symbol set
with 'option modules' and no 'MODULES' symbol? Surely, those projects do
not need tristates, but what should the code do in this case?

So, I don't know what to replace this 'sym_lookup(MODULES, 0)' with.

 Soory - no patch as I am busy with day-time job stuff.

I hope you can share some guidnce here, please... ;-)

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-08 Thread Yann E. MORIN
Stephen, All,

On 2013-08-08 21:16 +0200, Yann E. MORIN spake thusly:
> On 2013-08-08 10:36 +1000, Stephen Rothwell spake thusly:
> > On Thu, 8 Aug 2013 10:22:28 +1000 Stephen Rothwell 
> > wrote:
> > >
> > > More quick testing with an empty file: v3.9 is OK, v3.10 gives
> > > CONFIG_MODULES unset.
> 
> Sorry, I don't understand the above. Can you elaborate on what you did,
> what you got, what expected, so I can try to reproduce and fix this,
> please?

Ok, I've had a look in the linux-next archives, and I think I got it.
Is the following right?

git clean -d; git clean -dX # To be sure tree is clean
touch empty
make KCONFIG_ALLCONFIG=empty allmodconfig
grep MODULES .config
$ CONFIG_MODULES is not set

If so, I think I found the reason: the modules symbol is _always_ set to
being valid as soon as KCONFIG_ALLCONFIG is read, even if it was not
present in that file.

Since it is set to be valid, the following change means it is not
affected another value later on.

So, I wonder what the best option is:
  1- revert the following, and find another solution,
  2- de-specialise the modules symbol,
  3- or further specialise the modules symbol.

I'd be inclined to go for 1, but I have no straightforward idea so far.
It's late here, so I'll look more thouroughly this WE.

> > Bisecting gives:
> > 
> > cfa98f2e0ae956feca935573e977d7661a9561b9 is the first bad commit
> > commit cfa98f2e0ae956feca935573e977d7661a9561b9
> > Author: Yann E. MORIN 
> > Date:   Wed Apr 24 22:00:04 2013 +0200
> > 
> > kconfig: do not override symbols already set
> > 
> > For randconfig, if a list of required symbols is specified with
> > KCONFIG_ALLCONFIG, such symbols do not "have a value" as per
> > sym_has_value(), but have the "valid" flag set.
> > 
> > Signed-off-by: "Yann E. MORIN" 
> > 
> > And reverting that commit in v3.10 gives me CONFIG_MODULES=y.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-08 Thread Yann E. MORIN
Stephen, All,

On 2013-08-08 10:36 +1000, Stephen Rothwell spake thusly:
> On Thu, 8 Aug 2013 10:22:28 +1000 Stephen Rothwell 
> wrote:
> >
> > More quick testing with an empty file: v3.9 is OK, v3.10 gives
> > CONFIG_MODULES unset.

Sorry, I don't understand the above. Can you elaborate on what you did,
what you got, what expected, so I can try to reproduce and fix this,
please?

> Bisecting gives:
> 
> cfa98f2e0ae956feca935573e977d7661a9561b9 is the first bad commit
> commit cfa98f2e0ae956feca935573e977d7661a9561b9
> Author: Yann E. MORIN 
> Date:   Wed Apr 24 22:00:04 2013 +0200
> 
> kconfig: do not override symbols already set
> 
> For randconfig, if a list of required symbols is specified with
> KCONFIG_ALLCONFIG, such symbols do not "have a value" as per
> sym_has_value(), but have the "valid" flag set.
> 
> Signed-off-by: "Yann E. MORIN" 
> 
> And reverting that commit in v3.10 gives me CONFIG_MODULES=y.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-08 Thread Yann E. MORIN
Stephen, All,

On 2013-08-08 10:36 +1000, Stephen Rothwell spake thusly:
 On Thu, 8 Aug 2013 10:22:28 +1000 Stephen Rothwell s...@canb.auug.org.au
 wrote:
 
  More quick testing with an empty file: v3.9 is OK, v3.10 gives
  CONFIG_MODULES unset.

Sorry, I don't understand the above. Can you elaborate on what you did,
what you got, what expected, so I can try to reproduce and fix this,
please?

 Bisecting gives:
 
 cfa98f2e0ae956feca935573e977d7661a9561b9 is the first bad commit
 commit cfa98f2e0ae956feca935573e977d7661a9561b9
 Author: Yann E. MORIN yann.morin.1...@free.fr
 Date:   Wed Apr 24 22:00:04 2013 +0200
 
 kconfig: do not override symbols already set
 
 For randconfig, if a list of required symbols is specified with
 KCONFIG_ALLCONFIG, such symbols do not have a value as per
 sym_has_value(), but have the valid flag set.
 
 Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
 
 And reverting that commit in v3.10 gives me CONFIG_MODULES=y.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build failure after merge of the ext4 tree

2013-08-08 Thread Yann E. MORIN
Stephen, All,

On 2013-08-08 21:16 +0200, Yann E. MORIN spake thusly:
 On 2013-08-08 10:36 +1000, Stephen Rothwell spake thusly:
  On Thu, 8 Aug 2013 10:22:28 +1000 Stephen Rothwell s...@canb.auug.org.au
  wrote:
  
   More quick testing with an empty file: v3.9 is OK, v3.10 gives
   CONFIG_MODULES unset.
 
 Sorry, I don't understand the above. Can you elaborate on what you did,
 what you got, what expected, so I can try to reproduce and fix this,
 please?

Ok, I've had a look in the linux-next archives, and I think I got it.
Is the following right?

git clean -d; git clean -dX # To be sure tree is clean
touch empty
make KCONFIG_ALLCONFIG=empty allmodconfig
grep MODULES .config
$ CONFIG_MODULES is not set

If so, I think I found the reason: the modules symbol is _always_ set to
being valid as soon as KCONFIG_ALLCONFIG is read, even if it was not
present in that file.

Since it is set to be valid, the following change means it is not
affected another value later on.

So, I wonder what the best option is:
  1- revert the following, and find another solution,
  2- de-specialise the modules symbol,
  3- or further specialise the modules symbol.

I'd be inclined to go for 1, but I have no straightforward idea so far.
It's late here, so I'll look more thouroughly this WE.

  Bisecting gives:
  
  cfa98f2e0ae956feca935573e977d7661a9561b9 is the first bad commit
  commit cfa98f2e0ae956feca935573e977d7661a9561b9
  Author: Yann E. MORIN yann.morin.1...@free.fr
  Date:   Wed Apr 24 22:00:04 2013 +0200
  
  kconfig: do not override symbols already set
  
  For randconfig, if a list of required symbols is specified with
  KCONFIG_ALLCONFIG, such symbols do not have a value as per
  sym_has_value(), but have the valid flag set.
  
  Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
  
  And reverting that commit in v3.10 gives me CONFIG_MODULES=y.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] kconfig: silence warning when parsing auto.conf when a symbol has changed type

2013-08-06 Thread Yann E. MORIN
From: "Yann E. MORIN" 

When a symbol changes type from tristate to bool, and was previously set to
'm', a subsequent silentoldconfig would warn about inconsistency, such as:

include/config/auto.conf:3014:warning: symbol value 'm' invalid for
HOTPLUG_PCI_PCIE

Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
git checkout 1fe0135
make mrproper
make allmodconfig
make silentoldconfig
git checkout aa8032b
make allmodconfig
make silentoldconfig

Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
but then was set to 'y' by the second allmodconfig. Then the second
silentoldconfig prints the warning.

The warning in this case is a spurious warning, which happens at the time
kconfig tries to detect symbols that have changed, to touch the empty
header files in include/config used for dependency-tracking by make.

Silence the warning when we read the old auto.conf file, since it is
perfectly legit that a symbol changed type since the previous call.

Thread in:
http://marc.info/?l=linux-pci=137569198904000=2

Reported-by: Linus Torvalds 
Signed-off-by: "Yann E. MORIN" 
Cc: Linus Torvalds 
Cc: Michal Marek 
Cc: Thomas Petazzoni 
Cc: Bjorn Helgaas 
Cc: Yinghai Lu 
Cc: Benjamin Herrenschmidt 
---
 scripts/kconfig/confdata.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c55c227..87f7238 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -140,7 +140,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym->flags |= def_flags;
break;
}
-   conf_warning("symbol value '%s' invalid for %s", p, sym->name);
+   if (def != S_DEF_AUTO)
+   conf_warning("symbol value '%s' invalid for %s",
+p, sym->name);
return 1;
case S_OTHER:
if (*p != '"') {
@@ -161,7 +163,8 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
memmove(p2, p2 + 1, strlen(p2));
}
if (!p2) {
-   conf_warning("invalid string found");
+   if (def != S_DEF_AUTO)
+   conf_warning("invalid string found");
return 1;
}
/* fall through */
@@ -172,7 +175,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym->def[def].val = strdup(p);
sym->flags |= def_flags;
} else {
-   conf_warning("symbol value '%s' invalid for %s", p, 
sym->name);
+   if (def != S_DEF_AUTO)
+   conf_warning("symbol value '%s' invalid for %s",
+p, sym->name);
return 1;
}
break;
-- 
1.8.1.2

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


[PATCH] kconfig: silence warning when parsing auto.conf when a symbol has changed type

2013-08-06 Thread Yann E. MORIN
From: Yann E. MORIN yann.morin.1...@free.fr

When a symbol changes type from tristate to bool, and was previously set to
'm', a subsequent silentoldconfig would warn about inconsistency, such as:

include/config/auto.conf:3014:warning: symbol value 'm' invalid for
HOTPLUG_PCI_PCIE

Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
git checkout 1fe0135
make mrproper
make allmodconfig
make silentoldconfig
git checkout aa8032b
make allmodconfig
make silentoldconfig

Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
but then was set to 'y' by the second allmodconfig. Then the second
silentoldconfig prints the warning.

The warning in this case is a spurious warning, which happens at the time
kconfig tries to detect symbols that have changed, to touch the empty
header files in include/config used for dependency-tracking by make.

Silence the warning when we read the old auto.conf file, since it is
perfectly legit that a symbol changed type since the previous call.

Thread in:
http://marc.info/?l=linux-pcim=137569198904000w=2

Reported-by: Linus Torvalds torva...@linux-foundation.org
Signed-off-by: Yann E. MORIN yann.morin.1...@free.fr
Cc: Linus Torvalds torva...@linux-foundation.org
Cc: Michal Marek mma...@suse.cz
Cc: Thomas Petazzoni thomas.petazz...@free-electrons.com
Cc: Bjorn Helgaas bhelg...@google.com
Cc: Yinghai Lu ying...@kernel.org
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
---
 scripts/kconfig/confdata.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c55c227..87f7238 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -140,7 +140,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym-flags |= def_flags;
break;
}
-   conf_warning(symbol value '%s' invalid for %s, p, sym-name);
+   if (def != S_DEF_AUTO)
+   conf_warning(symbol value '%s' invalid for %s,
+p, sym-name);
return 1;
case S_OTHER:
if (*p != '') {
@@ -161,7 +163,8 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
memmove(p2, p2 + 1, strlen(p2));
}
if (!p2) {
-   conf_warning(invalid string found);
+   if (def != S_DEF_AUTO)
+   conf_warning(invalid string found);
return 1;
}
/* fall through */
@@ -172,7 +175,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, 
int def_flags, char *p)
sym-def[def].val = strdup(p);
sym-flags |= def_flags;
} else {
-   conf_warning(symbol value '%s' invalid for %s, p, 
sym-name);
+   if (def != S_DEF_AUTO)
+   conf_warning(symbol value '%s' invalid for %s,
+p, sym-name);
return 1;
}
break;
-- 
1.8.1.2

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


Re: Warnings from silentoldconfig (Re: [GIT PULL] PCI updates for v3.11)

2013-08-05 Thread Yann E. MORIN
not to be up-to-date, and everything would
be rebuilt.

Also, the issue has pre-existed for a long time and is only detected
now. I think the tristate->bool conversions in this thread just exposed
the issue, and are not the root cause.

One solution would be to read auto.conf *before* we fuzz around symbols,
not after. We should probably read auto.conf just after we read .config.

I've spent my whole evening on this issue, it's past 00:45 here, and I'm
slowly drifting away now... ;-)

I believe the warning to be just spurious, so it can bear one more day
before I can tackle this again.

In any case, I've found the kconfig code to be relatively difficult to
read and follow... :-( It's mostly an agglomerate of orgnic changes
accumulated over time, it is missing coments in the right places, is
rather complex with a lot of special cases spread out all over, and I
fell like wanting to knit after a slew of kitten has played with tens of
balls of wool... :-(

Anyway, with time, I'm eventually sorting things out one at a time, but
Woo... the headache... ;-]

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Warnings from silentoldconfig (Re: [GIT PULL] PCI updates for v3.11)

2013-08-05 Thread Yann E. MORIN
Michal, All,

On Monday 05 August 2013 10:39:43 Michal Marek wrote:
> On Fri, Aug 02, 2013 at 01:28:25PM -0700, Linus Torvalds wrote:
> > On Fri, Aug 2, 2013 at 11:17 AM, Bjorn Helgaas  wrote:
> > >
> > > Yinghai is still working on another SR-IOV-related fix or two, which
> > > will be simpler if pciehp is non-modular, so I included the Kconfig
> > > changes now to get them in earlier.
> > 
> > Hmm. Doing a trivial "make allmoconfig" for testing, I get
> > 
> >   include/config/auto.conf:3014:warning: symbol value 'm' invalid for
> > HOTPLUG_PCI_PCIE
> >   include/config/auto.conf:4711:warning: symbol value 'm' invalid for
> > HOTPLUG_PCI
> > 
> > but that may be a build system issue with stale data from the
> > *previous* "make allmodconfig". Regardless, that makes me worried.
> > 
> > Adding Michal Marek to the discussion. I'm currently doing a new "make
> > allmodconfig" after having done a "git clean -dqfx" to see if the
> > error remains. If it does, I will unpull. If it is gone, I'm going to
> > assume the Kconfig changes are ok, but that our build system is
> > missing some dependency.
> 
> Added Yann and the linux-kbuild list to CC. Reproducer:
> 
>   git checkout 1fe0135
>   make mrproper
>   make allmodconfig
>   make silentoldconfig
>   git checkout aa8032b
>   make allmodconfig
>   make silentoldconfig
> 
> conf_write_autoconf() first calls conf_split_config() to generate the
> include/config/**.h hierarchy, then generates include/config/auto.conf.
> For some reason, conf_split_config() reads include/config/auto.conf,
> which may not exist yet or may be out of date. Yann, can anything break
> if we simply do not read that file from conf_split_config(), like this?

Sorry, that's a part I'm not sure about, and seems non-trivial.
I'll look at it tonight (UTC+2) when I'm back home.

Regards,
Yann E. MORIN.

> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index c55c227..8c90835 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -829,16 +829,12 @@ next:
>  
>  static int conf_split_config(void)
>  {
> - const char *name;
>   char path[PATH_MAX+1];
>   char *s, *d, c;
>   struct symbol *sym;
>   struct stat sb;
>   int res, i, fd;
>  
> -     name = conf_get_autoconfig_name();
> - conf_read_simple(name, S_DEF_AUTO);
> -
>   if (chdir("include/config"))
>   return 1;
>  
> Thanks,
> Michal
> 

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --==< O_o >==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|  """  conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Warnings from silentoldconfig (Re: [GIT PULL] PCI updates for v3.11)

2013-08-05 Thread Yann E. MORIN
Michal, All,

On Monday 05 August 2013 10:39:43 Michal Marek wrote:
 On Fri, Aug 02, 2013 at 01:28:25PM -0700, Linus Torvalds wrote:
  On Fri, Aug 2, 2013 at 11:17 AM, Bjorn Helgaas bhelg...@google.com wrote:
  
   Yinghai is still working on another SR-IOV-related fix or two, which
   will be simpler if pciehp is non-modular, so I included the Kconfig
   changes now to get them in earlier.
  
  Hmm. Doing a trivial make allmoconfig for testing, I get
  
include/config/auto.conf:3014:warning: symbol value 'm' invalid for
  HOTPLUG_PCI_PCIE
include/config/auto.conf:4711:warning: symbol value 'm' invalid for
  HOTPLUG_PCI
  
  but that may be a build system issue with stale data from the
  *previous* make allmodconfig. Regardless, that makes me worried.
  
  Adding Michal Marek to the discussion. I'm currently doing a new make
  allmodconfig after having done a git clean -dqfx to see if the
  error remains. If it does, I will unpull. If it is gone, I'm going to
  assume the Kconfig changes are ok, but that our build system is
  missing some dependency.
 
 Added Yann and the linux-kbuild list to CC. Reproducer:
 
   git checkout 1fe0135
   make mrproper
   make allmodconfig
   make silentoldconfig
   git checkout aa8032b
   make allmodconfig
   make silentoldconfig
 
 conf_write_autoconf() first calls conf_split_config() to generate the
 include/config/**.h hierarchy, then generates include/config/auto.conf.
 For some reason, conf_split_config() reads include/config/auto.conf,
 which may not exist yet or may be out of date. Yann, can anything break
 if we simply do not read that file from conf_split_config(), like this?

Sorry, that's a part I'm not sure about, and seems non-trivial.
I'll look at it tonight (UTC+2) when I'm back home.

Regards,
Yann E. MORIN.

 diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
 index c55c227..8c90835 100644
 --- a/scripts/kconfig/confdata.c
 +++ b/scripts/kconfig/confdata.c
 @@ -829,16 +829,12 @@ next:
  
  static int conf_split_config(void)
  {
 - const char *name;
   char path[PATH_MAX+1];
   char *s, *d, c;
   struct symbol *sym;
   struct stat sb;
   int res, i, fd;
  
 - name = conf_get_autoconfig_name();
 - conf_read_simple(name, S_DEF_AUTO);
 -
   if (chdir(include/config))
   return 1;
  
 Thanks,
 Michal
 

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN |   ^|
| --== O_o ==-- '.---:  X  AGAINST  |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL|conspiracy.  |
'--'---'--''
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Warnings from silentoldconfig (Re: [GIT PULL] PCI updates for v3.11)

2013-08-05 Thread Yann E. MORIN
 spent my whole evening on this issue, it's past 00:45 here, and I'm
slowly drifting away now... ;-)

I believe the warning to be just spurious, so it can bear one more day
before I can tackle this again.

In any case, I've found the kconfig code to be relatively difficult to
read and follow... :-( It's mostly an agglomerate of orgnic changes
accumulated over time, it is missing coments in the right places, is
rather complex with a lot of special cases spread out all over, and I
fell like wanting to knit after a slew of kitten has played with tens of
balls of wool... :-(

Anyway, with time, I'm eventually sorting things out one at a time, but
Woo... the headache... ;-]

Regards,
Yann E. MORIN.

-- 
.-..--..
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Build regressions/improvements in v3.11-rc2

2013-07-27 Thread Yann E. MORIN
Geert, All,

Sorry to chime in a bit late...

On 2013-07-23 22:20 +0200, Geert Uytterhoeven spake thusly:
> On Tue, 23 Jul 2013, Geert Uytterhoeven wrote:
> > JFYI, when comparing v3.11-rc2 to v3.11-rc1[3], the summaries are:
> >   - build errors: +9/-23
[--SNIP--]
> powerpc-randconfig, due to a kconfig issue:
> 
> Expose SCOM controllers via debugfs (SCOM_DEBUGFS) [N/y] (NEW) aborted!
> Console input/output is redirected. Run 'make oldconfig' to update 
> configuration
> .
> make[3]: *** [silentoldconfig] Error 1

Can you give me instructions on how to reproduce this error?

randconfig now should print the RNF seed, so that's d be nice to have to
reproduce the error. Also, having the problematic changeset would be
nice.

Regards,
Yann E. MORIN.

-- 
.-..------.----.
|  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.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   3   4   5   >