linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
@ 2011-04-26 20:00 Randy Dunlap
  2011-04-26 23:09 ` David Rientjes
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Randy Dunlap @ 2011-04-26 20:00 UTC (permalink / raw)
  To: lkml; +Cc: akpm, David Rientjes, Peter Foley, torvalds

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

Surround the EXPERT menu with "if EXPERT" and "endif" so that it
is forced to stay as one unit.  Hopefully this will help to prevent
it being broken in the future.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Peter Foley <pefoley2@verizon.net>
---
 init/Kconfig |   36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

--- lnx-2639-rc4.orig/init/Kconfig
+++ lnx-2639-rc4/init/Kconfig
@@ -924,15 +924,17 @@ menuconfig EXPERT
           environments which can tolerate a "non-standard" kernel.
           Only use this if you really know what you are doing.
 
+if EXPERT
+
 config UID16
-	bool "Enable 16-bit UID system calls" if EXPERT
+	bool "Enable 16-bit UID system calls"
 	depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION)
 	default y
 	help
 	  This enables the legacy 16-bit UID syscall wrappers.
 
 config SYSCTL_SYSCALL
-	bool "Sysctl syscall support" if EXPERT
+	bool "Sysctl syscall support"
 	depends on PROC_SYSCTL
 	default y
 	select SYSCTL
@@ -949,7 +951,7 @@ config SYSCTL_SYSCALL
 	  If unsure say Y here.
 
 config KALLSYMS
-	 bool "Load all symbols for debugging/ksymoops" if EXPERT
+	 bool "Load all symbols for debugging/ksymoops"
 	 default y
 	 help
 	   Say Y here to let the kernel print out symbolic crash information and
@@ -980,7 +982,7 @@ config KALLSYMS_EXTRA_PASS
 
 
 config HOTPLUG
-	bool "Support for hot-pluggable devices" if EXPERT
+	bool "Support for hot-pluggable devices"
 	default y
 	help
 	  This option is provided for the case where no hotplug or uevent
@@ -990,7 +992,7 @@ config HOTPLUG
 
 config PRINTK
 	default y
-	bool "Enable support for printk" if EXPERT
+	bool "Enable support for printk"
 	help
 	  This option enables normal printk support. Removing it
 	  eliminates most of the message strings from the kernel image
@@ -999,7 +1001,7 @@ config PRINTK
 	  strongly discouraged.
 
 config BUG
-	bool "BUG() support" if EXPERT
+	bool "BUG() support"
 	default y
 	help
           Disabling this option eliminates support for BUG and WARN, reducing
@@ -1010,12 +1012,12 @@ config BUG
 
 config ELF_CORE
 	default y
-	bool "Enable ELF core dumps" if EXPERT
+	bool "Enable ELF core dumps"
 	help
 	  Enable support for generating core dumps. Disabling saves about 4k.
 
 config PCSPKR_PLATFORM
-	bool "Enable PC-Speaker support" if EXPERT
+	bool "Enable PC-Speaker support"
 	depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES
 	default y
 	help
@@ -1024,14 +1026,14 @@ config PCSPKR_PLATFORM
 
 config BASE_FULL
 	default y
-	bool "Enable full-sized data structures for core" if EXPERT
+	bool "Enable full-sized data structures for core"
 	help
 	  Disabling this option reduces the size of miscellaneous core
 	  kernel data structures. This saves memory on small machines,
 	  but may reduce performance.
 
 config FUTEX
-	bool "Enable futex support" if EXPERT
+	bool "Enable futex support"
 	default y
 	select RT_MUTEXES
 	help
@@ -1040,7 +1042,7 @@ config FUTEX
 	  run glibc-based applications correctly.
 
 config EPOLL
-	bool "Enable eventpoll support" if EXPERT
+	bool "Enable eventpoll support"
 	default y
 	select ANON_INODES
 	help
@@ -1048,7 +1050,7 @@ config EPOLL
 	  support for epoll family of system calls.
 
 config SIGNALFD
-	bool "Enable signalfd() system call" if EXPERT
+	bool "Enable signalfd() system call"
 	select ANON_INODES
 	default y
 	help
@@ -1058,7 +1060,7 @@ config SIGNALFD
 	  If unsure, say Y.
 
 config TIMERFD
-	bool "Enable timerfd() system call" if EXPERT
+	bool "Enable timerfd() system call"
 	select ANON_INODES
 	default y
 	help
@@ -1068,7 +1070,7 @@ config TIMERFD
 	  If unsure, say Y.
 
 config EVENTFD
-	bool "Enable eventfd() system call" if EXPERT
+	bool "Enable eventfd() system call"
 	select ANON_INODES
 	default y
 	help
@@ -1078,7 +1080,7 @@ config EVENTFD
 	  If unsure, say Y.
 
 config SHMEM
-	bool "Use full shmem filesystem" if EXPERT
+	bool "Use full shmem filesystem"
 	default y
 	depends on MMU
 	help
@@ -1089,13 +1091,15 @@ config SHMEM
 	  which may be appropriate on small systems without swap.
 
 config AIO
-	bool "Enable AIO support" if EXPERT
+	bool "Enable AIO support"
 	default y
 	help
 	  This option enables POSIX asynchronous I/O which may by used
           by some high performance threaded applications. Disabling
           this option saves about 7k.
 
+endif # EXPERT menu
+
 config EMBEDDED
 	bool "Embedded system"
 	select EXPERT

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-26 20:00 [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols Randy Dunlap
@ 2011-04-26 23:09 ` David Rientjes
  2011-04-26 23:15   ` Randy Dunlap
  2011-04-27  7:56   ` Geert Uytterhoeven
  2011-04-27  3:02 ` Mike Frysinger
  2011-04-27 23:14 ` Andrew Morton
  2 siblings, 2 replies; 8+ messages in thread
From: David Rientjes @ 2011-04-26 23:09 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, Andrew Morton, Peter Foley, Linus Torvalds

On Tue, 26 Apr 2011, Randy Dunlap wrote:

> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Surround the EXPERT menu with "if EXPERT" and "endif" so that it
> is forced to stay as one unit.  Hopefully this will help to prevent
> it being broken in the future.
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Peter Foley <pefoley2@verizon.net>
> ---
>  init/Kconfig |   36 ++++++++++++++++++++----------------
>  1 file changed, 20 insertions(+), 16 deletions(-)
> 
> --- lnx-2639-rc4.orig/init/Kconfig
> +++ lnx-2639-rc4/init/Kconfig
> @@ -924,15 +924,17 @@ menuconfig EXPERT
>            environments which can tolerate a "non-standard" kernel.
>            Only use this if you really know what you are doing.
>  
> +if EXPERT
> +
>  config UID16
> -	bool "Enable 16-bit UID system calls" if EXPERT
> +	bool "Enable 16-bit UID system calls"
>  	depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION)
>  	default y
>  	help
>  	  This enables the legacy 16-bit UID syscall wrappers.
>  

I don't like this, people who look up a Kconfig option typically only 
look at the single entry and look for dependencies within it, not the 
context in which it is declared in the Kconfig file.

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-26 23:09 ` David Rientjes
@ 2011-04-26 23:15   ` Randy Dunlap
  2011-04-27  7:56   ` Geert Uytterhoeven
  1 sibling, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2011-04-26 23:15 UTC (permalink / raw)
  To: David Rientjes; +Cc: linux-kernel, Andrew Morton, Peter Foley, Linus Torvalds

On Tue, 26 Apr 2011 16:09:47 -0700 (PDT) David Rientjes wrote:

> On Tue, 26 Apr 2011, Randy Dunlap wrote:
> 
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Surround the EXPERT menu with "if EXPERT" and "endif" so that it
> > is forced to stay as one unit.  Hopefully this will help to prevent
> > it being broken in the future.
> > 
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> > Cc: David Rientjes <rientjes@google.com>
> > Cc: Peter Foley <pefoley2@verizon.net>
> > ---
> >  init/Kconfig |   36 ++++++++++++++++++++----------------
> >  1 file changed, 20 insertions(+), 16 deletions(-)
> > 
> > --- lnx-2639-rc4.orig/init/Kconfig
> > +++ lnx-2639-rc4/init/Kconfig
> > @@ -924,15 +924,17 @@ menuconfig EXPERT
> >            environments which can tolerate a "non-standard" kernel.
> >            Only use this if you really know what you are doing.
> >  
> > +if EXPERT
> > +
> >  config UID16
> > -	bool "Enable 16-bit UID system calls" if EXPERT
> > +	bool "Enable 16-bit UID system calls"
> >  	depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION)
> >  	default y
> >  	help
> >  	  This enables the legacy 16-bit UID syscall wrappers.
> >  
> 
> I don't like this, people who look up a Kconfig option typically only 
> look at the single entry and look for dependencies within it, not the 
> context in which it is declared in the Kconfig file.

I think I know a bit about how that's done.

People should use tools to look at dependencies (like nconfig, xconfig, oldconfig).
They report dependencies correctly.

and this patch goes a long way toward preventing menu problems.

so I nak your (implied) nak.

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

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-26 20:00 [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols Randy Dunlap
  2011-04-26 23:09 ` David Rientjes
@ 2011-04-27  3:02 ` Mike Frysinger
  2011-04-27 23:14 ` Andrew Morton
  2 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-04-27  3:02 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, akpm, David Rientjes, Peter Foley, torvalds

On Tue, Apr 26, 2011 at 16:00, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Surround the EXPERT menu with "if EXPERT" and "endif" so that it
> is forced to stay as one unit.  Hopefully this will help to prevent
> it being broken in the future.

makes sense to me
-mike

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-26 23:09 ` David Rientjes
  2011-04-26 23:15   ` Randy Dunlap
@ 2011-04-27  7:56   ` Geert Uytterhoeven
  2011-04-27 14:42     ` Randy Dunlap
  1 sibling, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2011-04-27  7:56 UTC (permalink / raw)
  To: David Rientjes
  Cc: Randy Dunlap, linux-kernel, Andrew Morton, Peter Foley, Linus Torvalds

On Wed, Apr 27, 2011 at 01:09, David Rientjes <rientjes@google.com> wrote:
> On Tue, 26 Apr 2011, Randy Dunlap wrote:
>
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> Surround the EXPERT menu with "if EXPERT" and "endif" so that it
>> is forced to stay as one unit.  Hopefully this will help to prevent
>> it being broken in the future.
>>
>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Cc: David Rientjes <rientjes@google.com>
>> Cc: Peter Foley <pefoley2@verizon.net>
>> ---
>>  init/Kconfig |   36 ++++++++++++++++++++----------------
>>  1 file changed, 20 insertions(+), 16 deletions(-)
>>
>> --- lnx-2639-rc4.orig/init/Kconfig
>> +++ lnx-2639-rc4/init/Kconfig
>> @@ -924,15 +924,17 @@ menuconfig EXPERT
>>            environments which can tolerate a "non-standard" kernel.
>>            Only use this if you really know what you are doing.
>>
>> +if EXPERT
>> +
>>  config UID16
>> -     bool "Enable 16-bit UID system calls" if EXPERT
>> +     bool "Enable 16-bit UID system calls"
>>       depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION)
>>       default y
>>       help
>>         This enables the legacy 16-bit UID syscall wrappers.
>>
>
> I don't like this, people who look up a Kconfig option typically only
> look at the single entry and look for dependencies within it, not the
> context in which it is declared in the Kconfig file.

What about extracting the part that depends on EXPERT into its own file
init/Kconfig.expert?

Using separate Kconfig.xxx files could become a Kconfig pattern...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-27  7:56   ` Geert Uytterhoeven
@ 2011-04-27 14:42     ` Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2011-04-27 14:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David Rientjes, linux-kernel, Andrew Morton, Peter Foley, Linus Torvalds

On Wed, 27 Apr 2011 09:56:06 +0200 Geert Uytterhoeven wrote:

> On Wed, Apr 27, 2011 at 01:09, David Rientjes <rientjes@google.com> wrote:
> > On Tue, 26 Apr 2011, Randy Dunlap wrote:
> >
> >> From: Randy Dunlap <randy.dunlap@oracle.com>
> >>
> >> Surround the EXPERT menu with "if EXPERT" and "endif" so that it
> >> is forced to stay as one unit.  Hopefully this will help to prevent
> >> it being broken in the future.
> >>
> >> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> >> Cc: David Rientjes <rientjes@google.com>
> >> Cc: Peter Foley <pefoley2@verizon.net>
> >> ---
> >>  init/Kconfig |   36 ++++++++++++++++++++----------------
> >>  1 file changed, 20 insertions(+), 16 deletions(-)
> >>
> >> --- lnx-2639-rc4.orig/init/Kconfig
> >> +++ lnx-2639-rc4/init/Kconfig
> >> @@ -924,15 +924,17 @@ menuconfig EXPERT
> >>            environments which can tolerate a "non-standard" kernel.
> >>            Only use this if you really know what you are doing.
> >>
> >> +if EXPERT
> >> +
> >>  config UID16
> >> -     bool "Enable 16-bit UID system calls" if EXPERT
> >> +     bool "Enable 16-bit UID system calls"
> >>       depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION)
> >>       default y
> >>       help
> >>         This enables the legacy 16-bit UID syscall wrappers.
> >>
> >
> > I don't like this, people who look up a Kconfig option typically only
> > look at the single entry and look for dependencies within it, not the
> > context in which it is declared in the Kconfig file.
> 
> What about extracting the part that depends on EXPERT into its own file
> init/Kconfig.expert?
> 
> Using separate Kconfig.xxx files could become a Kconfig pattern...

Yes, I thought of that last night also.  Yes, it could help.

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

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-26 20:00 [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols Randy Dunlap
  2011-04-26 23:09 ` David Rientjes
  2011-04-27  3:02 ` Mike Frysinger
@ 2011-04-27 23:14 ` Andrew Morton
  2011-04-28  2:36   ` Randy Dunlap
  2 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2011-04-27 23:14 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, David Rientjes, Peter Foley, torvalds

On Tue, 26 Apr 2011 13:00:36 -0700
Randy Dunlap <rdunlap@xenotime.net> wrote:

> Surround the EXPERT menu with "if EXPERT" and "endif" so that it
> is forced to stay as one unit.  Hopefully this will help to prevent
> it being broken in the future.

With this patch applied, a `make oldconfig' unsets CONFIG_PRINTK,
producing a less-than-previously-useful kernel!

Config: http://userweb.kernel.org/~akpm/stuff/config-akpm2.txt

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

* Re: [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols
  2011-04-27 23:14 ` Andrew Morton
@ 2011-04-28  2:36   ` Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2011-04-28  2:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml, David Rientjes, Peter Foley, torvalds

On Wed, 27 Apr 2011 16:14:51 -0700 Andrew Morton wrote:

> On Tue, 26 Apr 2011 13:00:36 -0700
> Randy Dunlap <rdunlap@xenotime.net> wrote:
> 
> > Surround the EXPERT menu with "if EXPERT" and "endif" so that it
> > is forced to stay as one unit.  Hopefully this will help to prevent
> > it being broken in the future.
> 
> With this patch applied, a `make oldconfig' unsets CONFIG_PRINTK,
> producing a less-than-previously-useful kernel!
> 
> Config: http://userweb.kernel.org/~akpm/stuff/config-akpm2.txt

Yep, that's a problem.  Thanks.

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

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

end of thread, other threads:[~2011-04-28  2:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 20:00 [PATCH 2/2] init/Kconfig: use if/endif to surround the EXPERT menu kconfig symbols Randy Dunlap
2011-04-26 23:09 ` David Rientjes
2011-04-26 23:15   ` Randy Dunlap
2011-04-27  7:56   ` Geert Uytterhoeven
2011-04-27 14:42     ` Randy Dunlap
2011-04-27  3:02 ` Mike Frysinger
2011-04-27 23:14 ` Andrew Morton
2011-04-28  2:36   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).