13 Nov, 2013

15 commits

  • When using '!Ffile function' in a docbook template, and the function no
    longer exists, you get a "no structured comments found" error from the
    kernel-doc processing script. It's useful to know which functions it was
    looking for, so print them out in this case. Also do the same for '!Pfile
    doc-section'

    The same error also happens when using '!Efile' when some exported
    functions aren't documented (in the same file.) There's a very large
    number of such functions though, so don't print the message in this case
    -- right now it would give ~850 messages.

    Signed-off-by: Johannes Berg
    Cc: Rob Landley
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     
  • When expert configuration option(CONFIG_EXPERT) is enabled, menuconfig
    offers a choice of compression algorithm to compress initial ramfs image;
    This choice is stored into CONFIG_RD_* variables. But usr/Makefile uses
    earlier INITRAMFS_COMPRESSION_* macros to build initial ramfs file. Since
    none of them is defined, resulting 'initramfs_data.cpio' file remains
    un-compressed.

    This patch updates the Makefile to use CONFIG_RD_* variables and adds
    support for LZ4 compression algorithm. Also updates the
    'gen_initramfs_list.sh' script to check whether a selected compression
    command is accessible or not. And fall-back to default gzip(1)
    compression when it is not.

    Signed-off-by: P J P
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    P J P
     
  • Naked use sscanf can be troublesome because the pointed to variables may
    not have been set.

    Add a warning when the sscanf return value is not used.

    For now, do not add __must_check to the sscanf prototype because that will
    cause a couple of hundred new warnings when compiling a kernel.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Avoid prescribing kernel styled shortcuts for gcc extensions of
    __attribute__((foo)) in the uapi include paths.

    Fix $realfile filename when using -f/--file to not remove first level
    directory as if the filename was used in a -P1 patch. Only strip the
    first level directory (typically a or b) for P1 patches.

    Signed-off-by: Joe Perches
    Cc: "Dixit, Ashutosh"
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Find a few more cases where parentheses are used around the value of a
    return statement.

    This now uses the "$balanced_parens" test and also makes the test depend
    on perl v5.10 and higher.

    This now finds return with parenthesis uses the old code did not find
    like:

    ERROR: return is not a function, parentheses are not required
    #211: FILE: arch/m68k/include/asm/sun3xflop.h:211:
    + return ((error == 0) ? 0 : -1);

    Signed-off-by: Joe Perches
    Tested-by: David Cohen
    Acked-by: David Cohen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Kernel maintainers reject new instances of the GPL boilerplate paragraph
    directing people to write to the FSF for a copy of the GPL, since the FSF
    has moved in the past and may do so again.

    Make this an error for new code, but just a --strict CHK in --file mode;
    anyone interested in doing tree-wide cleanups of this form can enable this
    test explicitly.

    Signed-off-by: Josh Triplett
    Acked-by: Greg Kroah-Hartman
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • Peter Zijlstra prefers that comments be required near uses of memory
    barriers.

    Change the message level for memory barrier uses from a --strict test only
    to a normal WARN so it's always emitted.

    This might produce false positives around insertions of memory barriers
    when a comment is outside the patch context block.

    And checkpatch is still stupid, it only looks for existence of any
    comment, not at the comment content.

    Signed-off-by: Joe Perches
    Suggested-by: Peter Zijlstra
    Acked-by: Peter Zijlstra
    Acked-by: Paul E. McKenney
    Cc: Oliver Neukum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • People get this regularly wrong and it breaks the LTO builds, as it causes
    a section attribute conflict.

    Add --fix capability too.

    Based on a patch from Andi Kleen.

    Signed-off-by: Joe Perches
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a test for these #defines

    Additionally, moved string_find_replace sub as it screws up subsequent
    formatting when placed inside another sub.

    Signed-off-by: Joe Perches
    Suggested-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Checkpatch doesn't currently find CamelCase definitions of structs, unions
    or enums.

    Add that ability.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • seq_vprintf, seq_printf and seq_puts are logging functions and should be
    allowed to exceed the maximium line length.

    Add maximum line length exceptions for these functions.

    Also, suggesting seq_printf conversions to seq_puts should be tested for
    arguments after the format.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Extend the CamelCase words found to include structure members.

    In https://lkml.org/lkml/2013/9/3/318 Sarah Sharp (mostly) wrote:

    "In general, if checkpatch.pl complains about a variable a patch
    introduces that's CamelCase, you should pay attention to it. Otherwise,
    [] ignore it."

    So, if checking a patch, scan the original patched file if it's available
    and add any preexisting CamelCase types so reuses do not generate
    CamelCase messages.

    That also means Andrew's not so cruelly spurned anymore.
    https://lkml.org/lkml/2013/2/22/426

    Signed-off-by: Joe Perches
    Suggested-by: Sarah Sharp
    Suggested-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Spaces around trigraphs are specified by CodingStyle but checkpatch is
    currently silent about them because there are many current instances
    without them.

    Make missing spaces around trigraphs a --strict message.

    Signed-off-by: Joe Perches
    Reviewed-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • For some reason I managed to trick gcc into create CRC symbols that are
    not absolute anymore, but weak.

    Make modpost handle this case.

    Signed-off-by: Andi Kleen
    Cc: Al Viro
    Cc: Geert Uytterhoeven
    Cc: Tetsuo Handa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Building with a large config and -ffunction-sections results in a large
    number of sections and sortextable needs to be able to handle that.
    Implement support for > 64K sections as modpost does.

    Signed-off-by: Jamie Iles
    Cc: Rusty Russell
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jamie Iles
     

07 Nov, 2013

1 commit

  • When building perf out of tree:

    $ make perf-tar-src-pkg
    $ tar -xf perf-.tar -C /tmp
    $ cd /tmp/perf
    $ make -C tools/perf

    you get this warning message:
    make[1]: *** No rule to make target `kernelversion'. Stop.

    Fix it by saving the perf version in the tar file and using that for the
    out of tree builds.

    v2: removed short form request and fixed up version string from usual output.

    Signed-off-by: David Ahern
    Suggested-by: Ingo Molnar
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1383753335-25782-1-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

02 Nov, 2013

1 commit

  • This patch uses CONFIG_PAGE_OFFSET to filter symbols which
    are not in kernel address space because these symbols are
    generally for generating code purpose and can't be run at
    kernel mode, so we needn't keep them in /proc/kallsyms.

    For example, on ARM there are some symbols which may be
    linked in relocatable code section, then perf can't parse
    symbols any more from /proc/kallsyms, this patch fixes the
    problem (introduced b9b32bf70f2fb710b07c94e13afbc729afe221da)

    Cc: Russell King
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Michal Marek
    Signed-off-by: Ming Lei
    Signed-off-by: Rusty Russell
    Cc: stable@vger.kernel.org

    Ming Lei
     

25 Sep, 2013

1 commit


13 Sep, 2013

3 commits

  • Pull kconfig fix from Michal Marek:
    "This is a fix for a regression caused by my previous pull request.

    A sed command in scripts/config that used colons as separator was
    accidentally changed to use slashes, which fails when you use slashes
    in a value. Changing it back to colons is of course not a proper fix,
    but at least it will be broken in the same way it had been for four
    years. A proper fix is pending"

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    scripts/config: fix variable substitution command

    Linus Torvalds
     
  • Commit 229455bc02b87f7128f190c4491b4ceffff38648 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

    Clement Chauplannaz
     
  • Pull MIPS updates from Ralf Baechle:
    "This has been sitting in -next for a while with no objections and all
    MIPS defconfigs except one are building fine; that one platform got
    broken by another patch in your tree and I'm going to submit a patch
    separately.

    - a handful of fixes that didn't make 3.11
    - a few bits of Octeon 3 support with more to come for a later
    release
    - platform enhancements for Octeon, ath79, Lantiq, Netlogic and
    Ralink SOCs
    - a GPIO driver for the Octeon
    - some dusting off of the DECstation code
    - the usual dose of cleanups"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
    MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
    MIPS: kexec: Fix random crashes while loading crashkernel
    MIPS: kdump: Skip walking indirection page for crashkernels
    MIPS: DECstation HRT calibration bug fixes
    MIPS: Export copy_from_user_page() (needed by lustre)
    MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
    MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
    MIPS: ralink: Add support for reset-controller API
    MIPS: ralink: mt7620: Add cpu-feature-override header
    MIPS: ralink: mt7620: Add spi clock definition
    MIPS: ralink: mt7620: Add wdt clock definition
    MIPS: ralink: mt7620: Improve clock frequency detection
    MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
    MIPS: ralink: mt7620: Add verbose ram info
    MIPS: ralink: Probe clocksources from OF
    MIPS: ralink: Add support for systick timer found on newer ralink SoC
    MIPS: ralink: Add support for periodic timer irq
    MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
    MIPS: Netlogic: Add support for USB on XLP2xx
    MIPS: Netlogic: XLP2xx update for I2C controller
    ...

    Linus Torvalds
     

12 Sep, 2013

12 commits

  • As discussed recently on the arm [1] and lm-sensors [2] lists, it is
    possible to use section markers on variables in a way which gcc doesn't
    understand (or at least not the way the developer intended):

    static struct __initdata samsung_pll_clock exynos4_plls[nr_plls] = {

    does NOT put exynos4_plls in the .initdata section. The __initdata marker
    can be virtually anywhere on the line, EXCEPT right after "struct". The
    preferred location is before the "=" sign if there is one, or before the
    trailing ";" otherwise.

    [1] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/258149
    [2] http://lists.lm-sensors.org/pipermail/lm-sensors/2013-August/039836.html

    So, update checkpatch to find these misuses and report an error when it's
    immediately after struct or union, and a warning when it's otherwise not
    immediately before the ; or =.

    A similar patch was suggested by Andi Kleen
    https://lkml.org/lkml/2013/8/5/648

    Signed-off-by: Joe Perches
    Suggested-by: Jean Delvare
    Tested-by: Guenter Roeck
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • A previous patch ("checkpatch: add --types option to report only
    specific message types") uses a perl syntax introduced in perl version
    5.14.

    Use the backward compatible perl syntax instead.

    Signed-off-by: Joe Perches
    Reported-by: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • There are some cases where checkpatch can take a long time to complete.
    Reduce the likelihood of this long run-time by adding a new test for lines
    with and without comments and eliminating checks on lines with only
    comments.

    This reduces the number of "ctx_statement_block" calls, and also the
    number of tests of $stat, which is now undefined for these blank lines.

    One test in particular, the "check for switch/default statements without a
    break", could take an extremely long time to parse as it tries to skip
    interleaving comments within the ctx_statement_block/$stat and that could
    be done multiple times unnecessarily.

    A small test case taken from cfg80211.h before this patch would take
    1000's of seconds to run, now it's just a couple seconds.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Previous attempt at fixing SPACING errors could make a hash of several
    defects.

    This patch should make --fix be a lot better at correcting these defects.

    Trim left and right sides of these defects appropriately instead of a
    somewhat random attempt at it.

    Trim left spaces from any following bit of the modified line when only a
    single space is required around an operator.

    Signed-off-by: Joe Perches
    Cc: Phil Carmody
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The tracing subsystem uses slightly odd #defines to set path/directory
    locations for include files.

    These #defines can cause false positives for the complex macro tests so
    add exclusions for these specific #defines (TRACE_SYSTEM,
    TRACE_INCLUDE_FILE, TRACE_INCLUDE_PATH).

    Signed-off-by: Joe Perches
    Cc: Sarah Sharp
    Cc: Li Zefan
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add a --types convenience option to show only specific message types.
    Combined with the --fix option, this can produce specific suggested
    formatting patches to files.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • checkpatch can generate a false positive when inserting a new kernel-doc
    block and function above an existing kernel-doc block.

    Fix it by checking that the context line is also a newly inserted line.

    Signed-off-by: Joe Perches
    Reported-by: Darren Hart
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Using the extern keyword on function prototypes is superfluous visual
    noise so suggest removing it.

    Using extern can cause unnecessary line wrapping at 80 columns and
    unnecessarily long multi-line function prototypes.

    Signed-off-by: Joe Perches
    Suggested-by: Hannes Frederic Sowa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Emit a warning when a signature is used more than once.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • I got a bug report from a couple of users who said checkpatch.pl was
    broken for them. It was erroring out on fairly random lines most commonly
    with messages like:

    Nested quantifiers in regex; marked by
    Cc: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • $Lval is a test for complete name (ie: foo->bar.Baz[1])

    If any of this is CamelCase, then the current test uses the entire $Lval.
    This isn't optimal because it can emit messages with foo->bar.Baz and
    bar.Baz when Baz is a variable specified in an include file.

    So instead, break the $Lval into words and check each word for CamelCase
    uses.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Suggest a few more single-line corrections.

    Remove DOS line endings
    Simplify removing trailing whitespace
    Remove global/static initializations to 0/NULL
    Convert pr_warning to pr_warn
    Add space after brace
    Convert binary constants to hex
    Remove whitespace after line continuation
    Use inline not __inline or __inline__
    Use __printf and __scanf
    Use a single ; for statement terminations
    Convert __FUNCTION__ to __func__

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

11 Sep, 2013

1 commit

  • Pull kconfig updates from Michal Marek:
    "This is the kconfig part of kbuild for v3.12-rc1:
    - post-3.11 search code fixes and micro-optimizations
    - CONFIG_MODULES is no longer a special case; this is needed to
    eventually fix the bug that using KCONFIG_ALLCONFIG breaks
    allmodconfig
    - long long is used to store hex and int values
    - make silentoldconfig no longer warns when a symbol changes from
    tristate to bool (it's a job for make oldconfig)
    - scripts/diffconfig updated to work with newer Pythons
    - scripts/config does not rely on GNU sed extensions"

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: do not allow more than one symbol to have 'option modules'
    kconfig: regenerate bison parser
    kconfig: do not special-case 'MODULES' symbol
    diffconfig: Update script to support python versions 2.5 through 3.3
    diffconfig: Gracefully exit if the default config files are not present
    modules: do not depend on kconfig to set 'modules' option to symbol MODULES
    kconfig: silence warning when parsing auto.conf when a symbol has changed type
    scripts/config: use sed's POSIX interface
    kconfig: switch to "long long" for sanity
    kconfig: simplify symbol-search code
    kconfig: don't allocate n+1 elements in temporary array
    kconfig: minor style fixes in symbol-search code
    kconfig/[mn]conf: shorten title in search-box
    kconfig: avoid multiple calls to strlen
    Documentation/kconfig: more concise and straightforward search explanation

    Linus Torvalds
     

08 Sep, 2013

2 commits

  • Pull misc kbuild updates from Michal Marek:
    "In the kbuild misc branch, I have:
    - make rpm-pkg updates, most importantly the rpm package now calls
    /sbin/installkernel
    - make deb-pkg: debuginfo split, correct kernel image path for
    parisc, mips and powerpc and a couple more minor fixes
    - New coccinelle check"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    scripts/checkkconfigsymbols.sh: replace echo -e with printf
    Provide version number for Debian firmware package
    coccinelle: replace 0/1 with false/true in functions returning bool
    deb-pkg: add a hook argument to match debian hooks parameters
    deb-pkg: fix installed image path on parisc, mips and powerpc
    deb-pkg: split debug symbols in their own package
    deb-pkg: use KCONFIG_CONFIG instead of .config file directly
    rpm-pkg: add generation of kernel-devel
    rpm-pkg: install firmware files in kernel relative directory
    rpm-pkg: add %post section to create initramfs and grub hooks

    Linus Torvalds
     
  • Pull kbuild update from Michal Marek:
    "Only these two commits are in the kbuild branch this time:
    - Using filechk for include/config/kernel.release
    - Cleanup in scripts/sortextable.c"

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Do not overwrite include/config/kernel.release needlessly
    scripts: remove unused function in sortextable.c

    Linus Torvalds
     

07 Sep, 2013

1 commit

  • Pull Tile arch updates from Chris Metcalf:
    "These changes bring in a bunch of new functionality that has been
    maintained internally at Tilera over the last year, plus other stray
    bits of work that I've taken into the tile tree from other folks.

    The changes include some PCI root complex work, interrupt-driven
    console support, support for performing fast-path unaligned data
    fixups by kernel-based JIT code generation, CONFIG_PREEMPT support,
    vDSO support for gettimeofday(), a serial driver for the tilegx
    on-chip UART, KGDB support, more optimized string routines, support
    for ftrace and kprobes, improved ASLR, and many bug fixes.

    We also remove support for the old TILE64 chip, which is no longer
    buildable"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (85 commits)
    tile: refresh tile defconfig files
    tile: rework
    tile PCI RC: make default consistent DMA mask 32-bit
    tile: add null check for kzalloc in tile/kernel/setup.c
    tile: make __write_once a synonym for __read_mostly
    tile: remove support for TILE64
    tile: use asm-generic/bitops/builtin-*.h
    tile: eliminate no-op "noatomichash" boot argument
    tile: use standard tile_bundle_bits type in traps.c
    tile: simplify code referencing hypervisor API addresses
    tile: change to in comments
    tile: mark pcibios_init() as __init
    tile: check for correct compiler earlier in asm-offsets.c
    tile: use standard 'generic-y' model for
    tile: use asm-generic version of
    tile PCI RC: add comment about "PCI hole" problem
    tile: remove DEBUG_EXTRA_FLAGS kernel config option
    tile: add virt_to_kpte() API and clean up and document behavior
    tile: support FRAME_POINTER
    tile: support reporting Tilera hypervisor statistics
    ...

    Linus Torvalds
     

05 Sep, 2013

3 commits

  • 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
    Signed-off-by: Michal Marek

    Yann E. MORIN
     
  • Regenerate bison parser after changes made in:
    6902dcc: kconfig: do not special-case 'MODULES' symbol

    Signed-off-by: "Yann E. MORIN"
    Cc: Sam Ravnborg
    Signed-off-by: Michal Marek

    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
    Signed-off-by: Michal Marek

    Yann E. MORIN