13 Aug, 2010

2 commits

  • * 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits)
    param: don't deref arg in __same_type() checks
    param: update drivers/acpi/debug.c to new scheme
    param: use module_param in drivers/message/fusion/mptbase.c
    ide: use module_param_named rather than module_param_call
    param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
    param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
    param: lock myri10ge_fw_name against sysfs changes.
    param: simple locking for sysfs-writable charp parameters
    param: remove unnecessary writable charp
    param: add kerneldoc to moduleparam.h
    param: locking for kernel parameters
    param: make param sections const.
    param: use free hook for charp (fix leak of charp parameters)
    param: add a free hook to kernel_param_ops.
    param: silence .init.text references from param ops
    Add param ops struct for hvc_iucv driver.
    nfs: update for module_param_named API change
    AppArmor: update for module_param_named API change
    param: use ops in struct kernel_param, rather than get and set fns directly
    param: move the EXPORT_SYMBOL to after the definitions.
    ...

    Linus Torvalds
     
  • Permit .GCC-command-line sections in modules. Otherwise modpost says things
    like:

    WARNING: drivers/mtd/chips/map_ram.o (.GCC-command-line): unexpected non-allocatable section.
    Did you forget to use "ax"/"aw" in a .S file?
    Note that for example contains
    section definitions for use in .S files.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

11 Aug, 2010

3 commits

  • Fix mtd/nand_base.c kernel-doc warnings and typos.

    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'mtd'
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'ofs'
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'len'
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'invert'
    Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'mtd'
    Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'ofs'
    Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'len'
    Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'mtd'
    Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'ofs'
    Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'len'
    Warning(drivers/mtd/nand/nand_base.c:2087): No description found for parameter 'len'

    Signed-off-by: Randy Dunlap
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Fix error introduced by 37ed19d5cce35a40d3913cf9aa208ce9f60db3d7
    ("scripts/mod/modpost.c: fix memory leak").

    - don't kfree("")

    - fix one missed conversion

    Reported-by: Stephen Rothwell
    Tested-by: Stephen Rothwell
    Cc: Alexey Fomenko
    Cc: Trevor Keith
    Cc: Rusty Russell
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Ideally, we'd check that it was only the "set" function which was __init,
    and that the permissions were r/o. But that's a little hard.

    Signed-off-by: Rusty Russell
    Acked-by: Sam Ravnborg
    Tested-by: Phil Carmody

    Rusty Russell
     

10 Aug, 2010

8 commits

  • These are caused by checkpatch incorrectly parsing its internal
    representation of a statement block for struct's (or anything else that is
    a statement block encapsulated in {}'s that also ends with a ';'). Fix
    this by properly parsing a statement block.

    An example:

    +struct dummy_type dummy = {
    + .foo = "baz",
    +};
    +EXPORT_SYMBOL_GPL(dummy);
    +
    +static int dummy_func(void)
    +{
    + return -EDUMMYCODE;
    +}
    +EXPORT_SYMBOL_GPL(dummy_func);

    WARNING: EXPORT_SYMBOL(foo); should immediately \
    follow its function/variable
    #19: FILE: dummy.c:4:
    +EXPORT_SYMBOL_GPL(dummy);

    The above warning is issued when it should not be.

    Signed-off-by: Patrick Pannuto
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Pannuto
     
  • As explained in Documentation/timers/timers-howto.txt, msleep's of < 20ms
    may sleep for as long as 20ms. Caller's of msleep(1) or msleep(2), etc
    are likely not to expect this quirky behavior - warn them.

    Signed-off-by: Patrick Pannuto
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Pannuto
     
  • When possible, sleeping is (usually) better than delaying; however, don't
    bother callers of udelay < 10us, as those cases are generally not worth
    the switch to usleep

    [akpm@linux-foundation.org: fix mismatched parentheses]
    Signed-off-by: Patrick Pannuto
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Pannuto
     
  • Add new logging functions netdev_ and netif_.
    Don't complain if the only thing on a line is a quoted string.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Make error message say 'ERROR: do not initialise globals to 0 or NULL'
    rather than 'ERROR: do not initialise externals to 0 or NULL'. Makes more
    sense in the context since there is an extern keyword in C and that is a
    global declaration within the scope of the current file.

    Signed-off-by: Joe Eloff
    Cc: Andy Whitcroft
    Cc: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Eloff
     
  • I've got a false positive when spaces are present at the beginning of a
    line.

    So I add this check, obviously excluding to check the lines in the middle of
    comments.

    For instance this code passes the checkpatch test:

    +struct davinci_mcbsp_data {
    + unsigned int fmt;
    + int clk_div;
    +};
    +
    +static struct davinci_mcbsp_data mcbsp_data;

    Where, before the string "int clk_div", I have 4 spaces (\040
    ascii character).

    With v2.6.34 scripts/checkpatch.pl script I get:

    scripts/checkpatch.pl 0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch
    total: 0 errors, 0 warnings, 201 lines checked
    0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch has no obvious style
    problems and is ready for submission.

    That is not correct. Instead with the proposed patch I get:

    scripts/checkpatch.pl 0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch
    WARNING: please, no space for starting a line,
    excluding comments
    #63: FILE: sound/soc/davinci/davinci-i2s.c:165:
    + int clk_div;$

    WARNING: please, no space for starting a line,
    excluding comments
    #95: FILE: sound/soc/davinci/davinci-i2s.c:406:
    + return 0;$

    total: 0 errors, 2 warnings, 201 lines checked

    That is correct.

    Signed-off-by: Raffaele Recalcati
    Cc: Wolfram Sang
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Raffaele Recalcati
     
  • Change the check suggesting replacement of asm-includes with
    linux-includes. Exceptions to this rule are easier to extend now. Add
    memory.h because ARM has a custom one.

    Signed-off-by: Wolfram Sang
    Cc: Russell King
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • sec2annotation returns malloc'ed buffer directly to printf as an argument.
    Free this buffer after printing.

    Signed-off-by: Alexey Fomenko
    Cc: Trevor Keith
    Cc: Rusty Russell
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Fomenko
     

09 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: check kmalloc() result
    arch/tile: catch up on various minor cleanups.
    arch/tile: avoid erroneous error return for PTRACE_POKEUSR.
    tile: set ARCH_KMALLOC_MINALIGN
    tile: remove homegrown L1_CACHE_ALIGN macro
    arch/tile: Miscellaneous cleanup changes.
    arch/tile: Split the icache flush code off to a generic header.
    arch/tile: Fix bug in support for atomic64_xx() ops.
    arch/tile: Shrink the tile-opcode files considerably.
    arch/tile: Add driver to enable access to the user dynamic network.
    arch/tile: Enable more sophisticated IRQ model for 32-bit chips.
    Move list types from to .
    Add wait4() back to the set of syscalls.
    Revert adding some arch-specific signal syscalls to .
    arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent(). Feedback from fujita.tomonori@lab.ntt.co.jp.
    arch/tile: core support for Tilera 32-bit chips.
    Fix up the "generic" unistd.h ABI to be more useful.

    Linus Torvalds
     

07 Aug, 2010

2 commits

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits)
    tracing/kprobes: unregister_trace_probe needs to be called under mutex
    perf: expose event__process function
    perf events: Fix mmap offset determination
    perf, powerpc: fsl_emb: Restore setting perf_sample_data.period
    perf, powerpc: Convert the FSL driver to use local64_t
    perf tools: Don't keep unreferenced maps when unmaps are detected
    perf session: Invalidate last_match when removing threads from rb_tree
    perf session: Free the ref_reloc_sym memory at the right place
    x86,mmiotrace: Add support for tracing STOS instruction
    perf, sched migration: Librarize task states and event headers helpers
    perf, sched migration: Librarize the GUI class
    perf, sched migration: Make the GUI class client agnostic
    perf, sched migration: Make it vertically scrollable
    perf, sched migration: Parameterize cpu height and spacing
    perf, sched migration: Fix key bindings
    perf, sched migration: Ignore unhandled task states
    perf, sched migration: Handle ignored migrate out events
    perf: New migration tool overview
    tracing: Drop cpparg() macro
    perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
    ...

    Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c

    Linus Torvalds
     
  • Linus wrote:
    This seems to make "make oldconfig" a _lot_ more verbose than it
    used to be. In a very annoying way.

    I just did a quick git bisect. It's introduced by commit 4062f1a4c030
    ("kconfig: use long options in conf") by Sam Ravnborg. Apparently that
    thing is totally buggy, and doesn't just change the option names, but
    actively breaks them.

    The old behaviour (from years ago) were reintroduced by accident. Fix
    this so we are back to the version that are silent if there is nothing
    to ask about.

    Reported-by: Linus Torvalds
    Signed-off-by: Sam Ravnborg
    Reviewed-by: Michal Marek
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     

06 Aug, 2010

4 commits

  • Chris Metcalf
     
  • * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    scripts/dtc: Fix a resource leak
    Documentation: fix ubuntu distro name
    MAINTAINERS: Update kbuild git URLs
    Add support for the C variable in the coccicheck script
    Add scripts/coccinelle/deref_null.cocci
    Add scripts/coccinelle/err_cast.cocci
    Add scripts/coccinelle/resource_size.cocci
    Add scripts/coccinelle/alloc/kzalloc-simple.cocci
    Add scripts/coccinelle/alloc/drop_kmalloc_cast.cocci
    Add Documentation/coccinelle.txt
    Add a target to use the Coccinelle checker
    scripts: decodecode: remove bashisms
    Makefile: clarify a comment
    checkkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters
    scripts: add nconf into gitignore file

    Linus Torvalds
     
  • * 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    kbuild: Change section of generated debian packages to kernel
    kbuild: Mark that the packages generated conform to Standards-Version 3.8.4
    kbuild: Add homepage field to debian/control file

    Linus Torvalds
     
  • * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (26 commits)
    kconfig: add savedefconfig
    kconfig: code refactoring in confdata.c
    kconfig: refactor code in symbol.c
    kconfig: add alldefconfig
    kconfig: print more info when we see a recursive dependency
    kconfig: save location of config symbols
    kconfig: change nonint_oldconfig to listnewconfig
    kconfig: rename loose_nonint_oldconfig => oldnoconfig
    kconfig: use long options in conf
    kconfig: fix MODULES-related bug in case of no .config
    kconfig: make randconfig fair for booleans
    kconfig: Don't write invisible choice values
    kbuild: Warn on selecting symbols with unmet direct dependencies
    scripts:conf.c Fix warning: variable 'type' set but not used
    menuconfig: truncate list items
    menuconfig: fix to center checklist correctly in a corner case
    xconfig: add support to show hidden options which have prompts
    xconfig: remove unused function
    xconfig: clean up
    gconfig: fix null pointer warning
    ...

    Linus Torvalds
     

04 Aug, 2010

2 commits


03 Aug, 2010

13 commits

  • This patch makes modpost able to process object files with more than
    64k sections. Needed for huge kernel builds (allyesconfig, for example)
    with -ffunction-sections. 64k sections handling is covered, for example,
    by this document:

    "IA-64 gABI Proposal 74: Section Indexes"
    http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html

    Signed-off-by: Denys Vlasenko
    Signed-off-by: Anders Kaseorg
    Acked-by: Sam Ravnborg
    Cc: Rusty Russell
    Cc: Andi Kleen
    Signed-off-by: Michal Marek

    Denys Vlasenko
     
  • Signed-off-by: Uwe Kleine-König
    Signed-off-by: Michal Marek

    Uwe Kleine-König
     
  • It is now possible to assign options to AS and CC
    on the command line - which is only used for built-in code.

    {A,C}FLAGS_KERNEL was used both in the top-level Makefile
    in the arch makefiles, thus users had no way to specify
    additional options to AS, CC without overriding
    the original value.

    Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
    that is used by arch specific files and free up
    {A,C}FLAGS_KERNEL so they can be assigned on
    the command line.

    All arch Makefiles that used the old variables has been updated.

    Signed-off-by: Sam Ravnborg
    Cc: Tony Luck
    Cc: Hirokazu Takata
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • It is now possible to assign options to AS, CC and LD
    on the command line - which is only used when building modules.

    {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
    in the arch makefiles, thus users had no way to specify
    additional options to AS, CC, LD when building modules
    without overriding the original value.

    Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
    that is used by arch specific files and free up
    {A,C,LD}FLAGS_MODULE so they can be assigned on
    the command line.

    All arch Makefiles that used the old variables has been updated.

    Note: Previously we had a MODFLAGS variable for both
    AS and CC. But in favour of consistency this was dropped.
    So in some cases arch Makefile has one assignmnet replaced by
    two assignmnets.

    Note2: MODFLAGS was not documented and is dropped
    without any notice. I do not expect much/any breakage
    from this.

    Signed-off-by: Sam Ravnborg
    Cc: Denys Vlasenko
    Cc: Haavard Skinnemoen
    Cc: Mike Frysinger
    Cc: Tony Luck
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Chen Liqin
    Acked-by: Mike Frysinger [blackfin]
    Acked-by: Haavard Skinnemoen [avr32]
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • savedefconfig will save a minimal config to a file
    named "defconfig".

    The config symbols are saved in the same order as
    they appear in the menu structure so it should
    be possible to map them to the relevant menus
    if desired.

    The implementation was tested against several minimal
    configs for arm which was created using brute-force.

    There was one regression related to default numbers
    which had their valid range further limited by another symbol.

    Sample:

    config FOO
    int "foo"
    default 4

    config BAR
    int "bar"
    range 0 FOO

    If FOO is set to 3 then BAR cannot take a value higher than 3.
    But the current implementation will set BAR equal to 4.

    This is seldomly used and the final configuration is OK,
    and the fix was non-trivial.
    So it was documented in the code and left as is.

    Signed-off-by: Sam Ravnborg
    Acked-by: Uwe Kleine-König
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Add a a few local functions to avoid some code duplication
    No functional changes.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Move logic to determine default for a choice to
    a separate function.
    No functional changes.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • alldefconfig create a configuration with all values set
    to their default value (form the Kconfig files).

    This may be useful when we try to use more sensible default
    values and may also be used in combination with
    the minimal defconfigs.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Consider following kconfig file:

    config TEST1
    bool "test 1"
    depends on TEST2

    config TEST2
    bool "test 2"
    depends on TEST1

    Previously kconfig would report:

    foo:6:error: found recursive dependency: TEST2 -> TEST1 -> TEST2

    With the following patch kconfig reports:
    foo:5:error: recursive dependency detected!
    foo:5: symbol TEST2 depends on TEST1
    foo:1: symbol TEST1 depends on TEST2

    Note that we now report where the offending symbols are defined.
    This can be a great help for complex situations involving
    several files.

    Patch is originally from Roman Zippel with a few adjustments by Sam.

    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel
    Signed-off-by: Michal Marek

    Roman Zippel
     
  • When we add a new config symbol save the file/line
    so we later can refer to their location.

    The information is saved as a property to a config symbol
    because we may have multiple definitions of the same symbol.

    This has the side-effect that a symbol always has
    at least one property.

    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Rename to a name that better match the other kconfig targets.

    listnewconfig shall read as:

    - list new options compared to current configuration

    New options are now written to stdout so one can redirect the output.

    Do not exit with an error code if there is new options.

    These are feature changes compared to the original
    nonint_oldconfig - but as this feature has not yet been in a
    released kernel it should not matter.

    It is still possible to do:

    make listnewconfig
    lookup new config options in Kconfig*
    edit .config

    Signed-off-by: Sam Ravnborg
    Cc: Aristeu Rozanski
    Acked-by: Aristeu Rozanski
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • Rename target to something that fall more in line
    with the other kconfig targets.

    oldnoconfig shall read as:

    - read the old configuration and set all new options to no

    Signed-off-by: Sam Ravnborg
    Cc: Aristeu Rozanski
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • The list of options supported by conf is growing
    and their abbreviation did not resemble anything usefull.

    So drop the single letter options in favour of long options.

    The long options are named equal to what we know from
    the make target.
    The internal implmentation was changed to match this,
    resulting in much more readable code.

    Support for short options is dropped - no one is supposed
    to call this program direct anyway.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

02 Aug, 2010

1 commit


29 Jul, 2010

1 commit

  • There seems to be a kconfig bug due to MODULES not always being
    evaluated if no .config is found. Take the following Kconfig as an
    example:

    config MODULES
    def_bool y

    config FOO
    def_tristate m

    With no .config, the following configuration is generated:

    CONFIG_MODULES=y
    CONFIG_FOO=y

    With an empty .config, the following:

    CONFIG_MODULES=y
    CONFIG_FOO=m

    Tristate choice statements can also exhibit the problem, due to having an
    implicit rev_dep (select) containing "m".

    The problem is that MODULES is never evaluted in conf_read_simple() unless
    there's a .config. The following patch fixes this.

    Signed-off-by: Ulf Magnusson
    Reviewed-by: WANG Cong
    Signed-off-by: Michal Marek

    Ulf Magnusson
     

26 Jul, 2010

1 commit


23 Jul, 2010

2 commits

  • nconfig segfaults when help text contains the character '%'. For a quick
    example, navigate to the kernel compression options and get the help for
    bzip2. Doing so triggers a call to mvwprintw() with a string containing
    '%' and no extra arguments to fill in the specifier's value. Fix this
    case by printing the literal string retrieved from the kconfig.

    #0 0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
    #1 0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
    #2 0x00002b52b623991b in _nc_printf_string () from
    /lib/libncursesw.so.5
    #3 0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
    #4 0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
    #5 0x00000000004151d8 in fill_window (win=0x21b64c0,
    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
    speed is intermediate.\nDecompression speed is slowest among the
    three. The kernel\nsize is about 10% smaller with bzip2, in
    comparison to gzip.\nBzip2 us"...)
    at scripts/kconfig/nconf.gui.c:229
    #6 0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
    title=0x157fa30 "Bzip2",
    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
    ratio and speed is intermediate.\nDecompression speed is
    slowest among the three. The kernel\nsize is about 10%
    smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
    at scripts/kconfig/nconf.gui.c:535
    #7 0x00000000004055b2 in show_help (menu=0x157f9d0)
    at scripts/kconfig/nconf.c:1257
    #8 0x0000000000405897 in conf_choice (menu=0x157f130)
    at scripts/kconfig/nconf.c:1321
    #9 0x0000000000405326 in conf (menu=0x157d130) at
    scripts/kconfig/nconf.c:1208
    #10 0x00000000004052e8 in conf (menu=0xb434a0) at
    scripts/kconfig/nconf.c:1203
    #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)

    Cc: Michal Marek
    Cc: Nir Tzachar
    Signed-off-by: Stephen Boyd
    Signed-off-by: Michal Marek

    Stephen Boyd
     
  • …stedt/linux-2.6-trace into perf/core

    Ingo Molnar