1. 30 5月, 2013 1 次提交
    • D
      kconfig/menu.c: fix multiple references to expressions in menu_add_prop() · e983b7b1
      Dirk Gouders 提交于
      menu_add_prop() applies upper menus' visibilities to actual prompts
      by AND-ing the prompts visibilities with the upper menus ones.
      
      This creates a further reference to the menu's visibilities and when
      the expression reduction functions do their work, they may remove or
      modify expressions that have multiple references, thus causing
      unpredictable side-effects.
      
      The following example Kconfig constructs a case where this causes
      problems: a menu and a prompt which's visibilities depend on the same
      symbol.  When invoking mconf with this Kconfig and pressing "Z" we
      see a problem caused by a free'd expression still referenced by the
      menu's visibility:
      
      ------------------------------------------------------------------------
      mainmenu "Kconfig Testing Configuration"
      
      config VISIBLE
      	def_bool n
      
      config Placeholder
      	bool "Place holder"
      
      menu "Invisible"
      	visible if VISIBLE
      
      config TEST_VAR
      	bool "Test option" if VISIBLE
      
      endmenu
      ------------------------------------------------------------------------
      
      This patch fixes this problem by creating copies of the menu's
      visibility expressions before AND-ing them with the prompt's one.
      Signed-off-by: NDirk Gouders <dirk@gouders.net>
      [yann.morin.1998@free.fr: move variable into its block-scope,
                                keep lines <80 chars, typo]
      Tested-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      Reviewed-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      Signed-off-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
      e983b7b1
  2. 07 5月, 2013 1 次提交
  3. 01 5月, 2013 1 次提交
  4. 20 11月, 2012 1 次提交
  5. 25 10月, 2012 1 次提交
  6. 28 9月, 2012 2 次提交
  7. 08 8月, 2011 2 次提交
  8. 24 6月, 2011 1 次提交
  9. 07 6月, 2011 3 次提交
  10. 30 12月, 2010 1 次提交
  11. 16 12月, 2010 1 次提交
  12. 22 11月, 2010 1 次提交
  13. 04 10月, 2010 1 次提交
  14. 20 9月, 2010 3 次提交
  15. 03 8月, 2010 1 次提交
  16. 02 7月, 2010 1 次提交
    • C
      kbuild: Warn on selecting symbols with unmet direct dependencies · 246cf9c2
      Catalin Marinas 提交于
      The "select" statement in Kconfig files allows the enabling of options
      even if they have unmet direct dependencies (i.e. "depends on" expands
      to "no"). Currently, the "depends on" clauses are used in calculating
      the visibility but they do not affect the reverse dependencies in any
      way.
      
      The patch introduces additional tracking of the "depends on" statements
      and prints a warning on selecting an option if its direct dependencies
      are not met.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      246cf9c2
  17. 02 6月, 2010 3 次提交
    • L
      kconfig: fix to tag NEW symbols correctly · 3fb9acb3
      Li Zefan 提交于
      Those configs are not new:
      
        $ cat .config
        ...
        CONFIG_NAMESPACES=y
        ...
        CONFIG_BLOCK=y
        ...
      
      But are tagged as NEW:
      
        $ yes "" | make config > myconf
        $ cat myconf | grep '(NEW)'
        Namespaces support (NAMESPACES) [Y/?] (NEW) y
        ...
        Enable the block layer (BLOCK) [Y/?] (NEW) y
        ...
      
      You can also notice this bug when using gconfig/xconfig.
      
      It's because the SYMBOL_DEF_USER bit of an invisible symbol is cleared
      when the config file is read:
      
      int conf_read(const char *name)
      {
      	...
      	for_all_symbols(i, sym) {
      		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
      			/* Reset values of generates values, so they'll appear
      			 * as new, if they should become visible, but that
      			 * doesn't quite work if the Kconfig and the saved
      			 * configuration disagree.
      			 */
      			if (sym->visible == no && !conf_unsaved)
      				sym->flags &= ~SYMBOL_DEF_USER;
      	...
      }
      
      But a menu item which represents an invisible symbol is still
      visible, if it's sub-menu is visible, so its SYMBOL_DEF_USER
      bit should be set to indicate it's not NEW.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      3fb9acb3
    • L
      kconfig: print the range of integer/hex symbol in help text · 70ed0747
      Li Zefan 提交于
      Without this patch, one has to refer to the Kconfig file to find
      out the range of an integer/hex symbol.
      
        │ Symbol: NR_CPUS [=4]
        │ Type  : integer
        │ Range : [2 8]
        │ Prompt: Maximum number of CPUs
        │   Defined at arch/x86/Kconfig:761
        │   Depends on: SMP [=y] && !MAXSMP [=n]
        │   Location:
        │     -> Processor type and features
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      70ed0747
    • L
      kconfig: print symbol type in help text · b040b44c
      Li Zefan 提交于
      Randy suggested to print out the symbol type in gconfig.
      
      Note this change does more than Randy's suggestion, that it also
      affects menuconfig and "make config".
      
        │ Symbol: BLOCK [=y]
        │ Type  : boolean
        │ Prompt: Enable the block layer
        │   Defined at block/Kconfig:4
        │   Depends on: EMBEDDED [=n]
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      b040b44c
  18. 14 4月, 2010 2 次提交
    • L
      menuconfig: add support to show hidden options which have prompts · 22c7eca6
      Li Zefan 提交于
      Usage:
        Press <Z> to show all config symbols which have prompts.
      
      Quote Tim Bird:
      
      | I've been bitten by this numerous times.  I most often
      | use ftrace on ARM, but when I go back to x86, I almost
      | always go through a sequence of searching for the
      | function graph tracer in the menus, then realizing it's
      | completely missing until I disable CC_OPTIMIZE_FOR_SIZE.
      |
      | Is there any way to have the menu item appear, but be
      | unsettable unless the SIZE option is disabled?  I'm
      | not a Kconfig guru...
      
      I myself found this useful too. For example, I need to test
      ftrace/tracing and want to be sure all the tracing features are
      enabled, so I  enter the "Tracers" menu, and press <Z> to
      see if there is any config hidden.
      
      I also noticed gconfig and xconfig have a button "Show all options",
      but that's a bit too much, and I think normally what we are not
      interested in those configs which have no prompt thus can't be
      changed by users.
      
      Exmaple:
      
            --- Tracers
            -*-   Kernel Function Tracer
            - -     Kernel Function Graph Tracer
            [*]   Interrupts-off Latency Tracer
            - -   Preemption-off Latency Tracer
            [*]   Sysprof Tracer
      
      Here you can see 2 tracers are not selectable, and then can find
      out how to make them selectable.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      22c7eca6
    • L
      kconfig: some small fixes · 4280eae0
      Li Zefan 提交于
      - fix a typo in documentation
      - fix a typo in a printk on error
      - fix comments in dialog_inputbox()
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      4280eae0
  19. 02 2月, 2010 1 次提交
  20. 20 9月, 2009 3 次提交
  21. 29 4月, 2008 1 次提交
    • R
      kconfig: add named choice group · 5a1aa8a1
      Roman Zippel 提交于
      As choice dependency are now fully checked, it's quite easy to add support
      for named choices. This lifts the restriction that a choice value can only
      appear once, although it still has to be within the same group,
      but multiple choices can be joined by giving them a name.
      While at it I cleaned up a little the choice type logic to simplify it a
      bit.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      5a1aa8a1
  22. 03 2月, 2008 1 次提交
    • S
      kconfig: ignore select of unknown symbol · 603d4988
      Sam Ravnborg 提交于
      We have had warnings for a long time about select of unknow symbol
      but the warnings does not really makes sense since we may
      select a symbol that is relevant and defined in one
      arch but not in another arch.
      And as long as we do not use a common set of Kconfig files
      for all archs lets just ignore this case.
      
      Previously we have used this to find bad uses of
      select but we need a more relaible method to do so.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      603d4988
  23. 29 1月, 2008 4 次提交
  24. 20 10月, 2007 1 次提交
    • L
      Revert "kconfig: tristate choices with mixed tristate and boolean values" · e8b8c977
      Linus Torvalds 提交于
      This reverts commit a5bf3d89.
      
      David Brownell notes that this causes a regression visible in the
      drivers/usb/gadget Kconfig file:
      
        "That Kconfig hasn't changed (other than adding new drivers), and it's
         worked that way for several years now ...  so the issue seems to be
         changes in menuconfig/kconfig/etc semantics.
      
         The issue is that when USB_GADGET=m, it's no longer possible to
         configure peripheral controller drivers as modules ...  the
         controller drivers can now only be configured for static linkage.
      
         It should be making a choice of one of the controller drivers which
         could work on the target system, and allow that driver to be linked
         either as a module (ok iff USB_GADGET=m) or statically."
      
      Reverting this commit resolves the problem, and also fixes a second
      problem that David noticed: various dependent options couldn't be enabled.
      Tested-and-reported-by: NDavid Brownell <david-b@pacbell.net>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Jan Beulich <jbeulich@novell.com>,
      Cc: Andrew Morton <akpm@linux-foundation.org>,
      Cc: Sam Ravnborg <sam@ravnborg.org>,
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8b8c977
  25. 13 10月, 2007 1 次提交
  26. 26 7月, 2007 1 次提交
    • S
      kconfig: attach help text to menus · 03d29122
      Sam Ravnborg 提交于
      Roman Zippel wrote:
      > A simple example would be
      > help texts, right now they are per symbol, but they should really be per
      > menu, so archs can provide different help texts for something.
      
      This patch does this and at the same time introduce a few API
      funtions used to access the help text.
      
      The relevant api functions are introduced in the various frontends.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      03d29122