17 Jan, 2012

1 commit

  • * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    menuconfig: fix a regression when canceling the prompt dialog at exit
    kbuild: Fix compiler warning with assertion when calling 'fwrite'
    Improve update-po-config output
    menuconfig: let make not report error when not save configuration
    merge_config.sh: fix bug in final check
    merge_config.sh: whitespace cleanup
    merge_config.sh: use signal names compatible with dash and bash
    kconfig: add merge_config.sh script
    kconfig: use xfwrite wrapper function to silence warnings
    kconfig: fix set but not used warnings
    kconfig: fix warnings by specifing format arguments

    Linus Torvalds
     

16 Jan, 2012

1 commit

  • This commit fixes a bug, while introducing a new one..

    commit 7203ddbd4be9720649e47d756a001e0c7d7f8ae2
    Author: Wang YanQing
    Date: Thu Jan 12 11:31:32 2012 +0800

    menuconfig: let make not report error when not save configuration

    Pressing ESC should cancel the yes/no dialog and return back to
    the main menu, but not exit from menuconfig.

    Signed-off-by: Li Zefan
    Acked-by: Wang YanQing
    Signed-off-by: Michal Marek

    Li Zefan
     

15 Jan, 2012

7 commits

  • Reinhard Tartler discovered a corner case of calling xfwrite() where the
    length of the string is zero.

    Arnaud Lacombe suggested to use assertion for the corner case, as
    fwrite(3) is currently used:

    1) in comment printers. Empty comment are not allowed.
    2) in a callback passed to expr_print(), where the string printed is
    either NULL OR non-empty.
    3) in the lexer, auto-generated, and unused.

    I feel using assertion is a good solution:

    1) It cleanly takes care of the above-mentioned corner case.
    2) It can be easily disabled by defining NDEBUG.
    3) It asserts xfwrite() is simply a wrapper for fwrite().

    Reported-by: Reinhard Tartler
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Jean Sacren
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • Make the V=0 output from update-po-config be aligned correctly.
    Also remove an outdated comment and add a "GEN" statement.

    Signed-off-by: Peter Foley
    Signed-off-by: Michal Marek

    Peter Foley
     
  • I find every time when I choice the 'NO' button at the dialog
    which let me choice whether to save the configuration before exit
    menuconfig, it always report the blow:

    " GEN /mnt/sda7/home/build/test/Makefile
    HOSTCC scripts/kconfig/mconf.o
    HOSTLD scripts/kconfig/mconf
    scripts/kconfig/mconf Kconfig

    Your configuration changes were NOT saved.

    make[2]: *** [menuconfig] Error 1
    make[1]: *** [menuconfig] Error 2
    make: *** [sub-make] Error 2 "

    This patch repair it.

    Signed-off-by: Wang YanQing
    Acked-by: Davidlohr Bueso
    Signed-off-by: Michal Marek

    Wang YanQing
     
  • Arnaud Lacombe pointed out the final checking that the requested configs
    were included in the final .config was broken.

    The example was that if you had a fragment that disabled
    CONFIG_DECOMPRESS_GZIP applied to a normal defconfig, there would be no
    final warning that CONFIG_DECOMPRESS_GZIP was acutally set in the final
    .config.

    This bug was introduced by me in v3 of the original patch, and the
    following patch reverts the invalid change.

    Signed-off-by: John Stultz
    Reported-by: Arnaud Lacombe
    Cc: Darren Hart
    Cc: Michal Marek
    Cc: Arnaud Lacombe
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    John Stultz
     
  • Fix whitespace usage in the clean_up routine.

    Signed-off-by: Darren Hart
    Acked-by: John Stultz
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Darren Hart
     
  • The SIGHUP SIGINT and SIGTERM names caused failures when running
    merge_config.sh with the dash shell. Dropping the "SIG" component makes
    the script work in both bash and dash.

    Signed-off-by: Darren Hart
    Acked-by: John Stultz
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Darren Hart
     
  • After noticing almost every distro has their own method of managing config
    fragments, I went looking at some best practices, and wanted to try to
    consolidate some of the different approaches so this fairly simple
    infrastructure can be shared (and new distros/build systems don't have to
    implement yet another config fragment merge script).

    This script is most influenced by the Windriver tools used in the Yocto
    Project, reusing some portions found there.

    This script merges multiple config fragments, warning on any overridden
    values. It then sets any unspecified values to their default, then
    finally checks to make sure no specified value was dropped due to
    unsatisfied dependencies.

    I'm sure this implementation won't work for everyone, and I expect it will
    need to evolve to adapt for various use cases. But I think its a
    reasonable starting point.

    Cc: Sam Ravnborg
    Cc: Greg Thelen
    Cc: Reinhard Tartler
    Cc: Dmitry Fink
    Cc: Darren Hart
    Cc: Eric B Munson
    Cc: Bruce Ashfield
    Cc: Michal Marek
    Signed-off-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    john stultz
     

14 Jan, 2012

2 commits

  • Thomas Lange reported that when he did a 'make localmodconfig', his
    config was missing the brcmsmac driver, even though he had the module
    loaded.

    Looking into this, I found the file:
    drivers/net/wireless/brcm80211/brcmsmac/Makefile
    had the following in the Makefile:

    MODULEPFX := brcmsmac

    obj-$(CONFIG_BRCMSMAC) += $(MODULEPFX).o

    The way streamline-config.pl works, is parsing all the
    obj-$(CONFIG_FOO) += foo.o
    lines to find that CONFIG_FOO belongs to the module foo.ko.

    But in this case, the brcmsmac.o was not used, but a variable in its place.

    By changing streamline-config.pl to remember defined variables in Makefiles
    and substituting them when they are used in the obj-X lines, allows
    Thomas (and others) to have their brcmsmac module stay configured
    when it is loaded and running "make localmodconfig".

    Reported-by: Thomas Lange
    Tested-by: Thomas Lange
    Cc: Arend van Spriel
    Cc: stable@vger.kernel.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Simplify the way lines ending with backslashes (continuation) in Makefiles
    is parsed. This is needed to implement a necessary fix.

    Tested-by: Thomas Lange
    Cc: stable@vger.kernel.org
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

19 Dec, 2011

2 commits

  • Commit 5c48b108 ("um: take arch/um/sys-x86 to arch/x86/um") broke the
    make target update-po-config, as its symlink trick (again) fails.
    (Previous breakage was fixed with commit bdc69ca4 ("kconfig: change
    update-po-config to reflect new layout of arch/um").)

    The new UML layout allows to drop the symlick trick entirely. And if,
    one day, another architecture supports UML too, that should now work
    without again breaking this make target.

    Signed-off-by: Paul Bolle
    Signed-off-by: Michal Marek

    Paul Bolle
     
  • Use the xfwrite wrapper function defined in lkc.h to check the return value of
    fwrite and silence these warnings.

    HOSTCC scripts/kconfig/zconf.tab.o
    scripts/kconfig/zconf.tab.c: In function 'header_print_comment':
    /usr/src/lto/scripts/kconfig/confdata.c:551:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
    scripts/kconfig/zconf.tab.c: In function 'kconfig_print_comment':
    /usr/src/lto/scripts/kconfig/confdata.c:467:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result

    Signed-off-by: Peter Foley
    Signed-off-by: Michal Marek

    Peter Foley
     

12 Dec, 2011

2 commits

  • Remove set but not used variables to fix warnings.

    HOSTCC scripts/kconfig/gconf.o
    /usr/src/lto/scripts/kconfig/gconf.c: In function 'change_sym_value':
    /usr/src/lto/scripts/kconfig/gconf.c:833:11: warning: variable 'oldval' set but not used [-Wunused-but-set-variable]
    /usr/src/lto/scripts/kconfig/gconf.c: In function 'update_tree':
    /usr/src/lto/scripts/kconfig/gconf.c:1281:19: warning: variable 'prop' set but not used [-Wunused-but-set-variable]

    Signed-off-by: Peter Foley
    Signed-off-by: Michal Marek

    Peter Foley
     
  • Specify format arguments to fix warnings.

    HOSTCC scripts/kconfig/gconf.o
    /usr/src/lto/scripts/kconfig/gconf.c: In function 'on_introduction1_activate':
    /usr/src/lto/scripts/kconfig/gconf.c:686:6: warning: format not a string literal and no format arguments
    /usr/src/lto/scripts/kconfig/gconf.c: In function 'on_about1_activate':
    /usr/src/lto/scripts/kconfig/gconf.c:704:6: warning: format not a string literal and no format arguments
    /usr/src/lto/scripts/kconfig/gconf.c: In function 'on_license1_activate':
    /usr/src/lto/scripts/kconfig/gconf.c:723:6: warning: format not a string literal and no format arguments

    Signed-off-by: Peter Foley
    Signed-off-by: Michal Marek

    Peter Foley
     

09 Sep, 2011

5 commits

  • to make it easier to locate begin/end when editing long strings;

    Signed-off-by: Cheng Renquan
    Acked By: Nir Tzachar

    Cheng Renquan
     
  • The original dialog_inputbox doesn't work with longer than prompt_width
    strings, here fixed it in this way:
    1) add variable cursor_form_win to record cursor of form_win,
    keep its value always between [0, prompt_width-1];
    reuse the original cursor_position as cursor of the string result,
    use (cursor_position-cursor_form_win) as begin offset to show part of
    the string in form_win;

    Signed-off-by: Cheng Renquan
    Cc: Arnaud Lacombe
    Cc: Nir Tzachar

    Cheng Renquan
     
  • To support unlimited length string config items;

    No check for realloc return value keeps code simple, and to be
    consistent with other existing unchecked malloc in kconfig.

    Signed-off-by: Cheng Renquan
    Signed-off-by: Arnaud Lacombe

    Cheng Renquan
     
  • In case KEY_BACKSPACE / KEY_DC to delete a char, it memmove only
    (len-cursor_position+1) bytes;
    the default case is to insert a char, it should also memmove exactly
    (len-cursor_position+1) bytes;

    the original use of (len+1) is wrong and may access following memory
    that doesn't belong to result, may cause SegFault in theory;

    case KEY_BACKSPACE:
    if (cursor_position > 0) {
    memmove(&result[cursor_position-1],
    &result[cursor_position],
    len-cursor_position+1);
    cursor_position--;
    }
    break;
    case KEY_DC:
    if (cursor_position >= 0 && cursor_position < len) {
    memmove(&result[cursor_position],
    &result[cursor_position+1],
    len-cursor_position+1);
    }
    break;
    default:
    if ((isgraph(res) || isspace(res)) &&
    len-2 < result_len) {
    /* insert the char at the proper position */
    memmove(&result[cursor_position+1],
    &result[cursor_position],
    len-cursor_position+1);
    result[cursor_position] = res;
    cursor_position++;
    }

    Signed-off-by: Cheng Renquan
    Acked-by: Nir Tzachar

    Cheng Renquan
     
  • Signed-off-by: Cheng Renquan
    Acked-by: Arnaud Lacombe

    Cheng Renquan
     

31 Aug, 2011

1 commit


30 Aug, 2011

3 commits


19 Aug, 2011

1 commit


08 Aug, 2011

6 commits


30 Jul, 2011

2 commits

  • * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
    kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()
    xconfig: Abort close if configuration cannot be saved
    kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h
    kconfig/nconf: remove useless conditionnal
    kconfig/nconf: prevent segfault on empty menu
    kconfig/nconf: use the generic menu_get_ext_help()
    nconfig: Avoid Wunused-but-set warning
    kconfig/conf: mark xfgets() private
    kconfig: remove pending prototypes for kconfig_load()
    kconfig/conf: add command line options' description
    kconfig/conf: reduce the scope of `defconfig_file'
    kconfig: use calloc() for expr allocation
    kconfig: introduce specialized printer
    kconfig: do not overwrite symbol direct dependency in assignment
    kconfig/gconf: silent missing prototype warnings
    kconfig/gconf: kill deadcode
    kconfig: nuke LKC_DIRECT_LINK cruft
    kconfig: nuke reference to SWIG
    kconfig: add missing inclusion
    kconfig: add missing inclusion
    ...

    Fix up conflicts in scripts/kconfig/Makefile

    Linus Torvalds
     
  • Replace the config_is_*() macros with a variant that allows for grepping
    for usage of CONFIG_* options in the code. Usage:

    if (IS_ENABLED(CONFIG_NUMA))

    or

    #if IS_ENABLED(CONFIG_NUMA)

    The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
    or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
    the option is 'm'. Only boolean and tristate options are supported.

    Reviewed-by: Arnaud Lacombe
    Acked-by: Randy Dunlap
    Signed-off-by: Michal Marek

    Michal Marek
     

25 Jul, 2011

1 commit


18 Jul, 2011

1 commit

  • The specialized printer for headers (espectially autoconf.h) is missing
    fixup code for S_HEX symbol's "0x" prefix. As long as kconfig does not
    warn for such missing prefix, this code is needed. Fix this.

    In the same time, fix some nits in `header_print_symbol()'.

    Cc: Randy Dunlap
    Cc: Mauro Carvalho Chehab

    Broken-by: Arnaud Lacombe
    Reported-by: Randy Dunlap
    Reported-by: Mauro Carvalho Chehab
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Randy Dunlap
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     

13 Jul, 2011

4 commits

  • After the test

    if (!submenu || ...)
    continue;

    the variable `submenu' can _not_ be NULL, so do not test for this
    situation.

    Cc: Nir Tzachar
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • nconf does not check the validity of the current menu when help is
    requested (with either , '?' or 'h'). This leads to a NULL pointer
    dereference when an empty menu is encountered.

    The following reduced testcase exposes the problem:

    config DEP
    bool

    menu "FOO"

    config BAR
    bool "BAR"
    depends on DEP

    endmenu

    Issue will happen when entering menu "FOO" and requesting help.

    nconf is the only front-end which do not filter the validity of the
    current menu. Such filter can not really happen beforehand as other key
    which does not deals with the current menu might be entered by the user,
    so just bails out earlier if we encounter an invalid menu.

    Cc: Nir Tzachar
    Cc: Andrej Gelenberg
    Reported-by: Andrej Gelenberg
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • nconf is the only front-end which does not use this helper, but prefer
    to copy/paste the code. The test wrt. menu validity added in this
    version of the code is bogus anyway as an invalid menu will get
    dereferenced a few line below by calling menu_get_prompt().

    For now, convert nconf to use menu_get_ext_help(), as do every other
    front-end. We will deals with menu validity checks properly in a
    separate commit.

    Cc: Nir Tzachar
    Cc: Andrej Gelenberg
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • I am seeing Wunused-but-set warning while make nconfig. Looks like
    active_menu is not used. Removing it fixes the warning.

    Signed-off-by: Raghavendra D Prabhu
    Acked-by: WANG Cong
    Signed-off-by: Michal Marek

    Raghavendra D Prabhu
     

04 Jul, 2011

1 commit