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

4 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
     
  • Pull module updates from Rusty Russell:
    "Minor fixes mainly, including a potential use-after-free on remove
    found by CONFIG_DEBUG_KOBJECT_RELEASE which may be theoretical"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    module: Fix mod->mkobj.kobj potentially freed too early
    kernel/params.c: use scnprintf() instead of sprintf()
    kernel/module.c: use scnprintf() instead of sprintf()
    module/lsm: Have apparmor module parameters work with no args
    module: Add NOARG flag for ops with param_set_bool_enable_only() set function
    module: Add flag to allow mod params to have no arguments
    modules: add support for soft module dependencies
    scripts/mod/modpost.c: permit '.cranges' secton for sh64 architecture.
    module: fix sprintf format specifier in param_get_byte()

    Linus Torvalds
     

02 Sep, 2013

1 commit


30 Aug, 2013

1 commit


28 Aug, 2013

1 commit


20 Aug, 2013

2 commits


16 Aug, 2013

4 commits

  • When a symbol changes type from tristate to bool, and was previously set to
    'm', a subsequent silentoldconfig would warn about inconsistency, such as:

    include/config/auto.conf:3014:warning: symbol value 'm' invalid for
    HOTPLUG_PCI_PCIE

    Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
    git checkout 1fe0135
    make mrproper
    make allmodconfig
    make silentoldconfig
    git checkout aa8032b
    make allmodconfig
    make silentoldconfig

    Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
    previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
    but then was set to 'y' by the second allmodconfig. Then the second
    silentoldconfig prints the warning.

    The warning in this case is a spurious warning, which happens at the time
    kconfig tries to detect symbols that have changed, to touch the empty
    header files in include/config used for dependency-tracking by make.

    Silence the warning when we read the old auto.conf file, since it is
    perfectly legit that a symbol changed type since the previous call.

    Thread in:
    http://marc.info/?l=linux-pci&m=137569198904000&w=2

    Reported-by: Linus Torvalds
    Signed-off-by: "Yann E. MORIN"
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Thomas Petazzoni
    Cc: Bjorn Helgaas
    Cc: Yinghai Lu
    Cc: Benjamin Herrenschmidt

    Yann E. MORIN
     
  • Script `config' relies on extensions of `GNU sed', and is thus not
    working on all Unixes:
    - in-place edition of files (-i), which can be replaced with
    a temporary file;
    - extended-regexps (-r), which can be split into basic regexps;
    - single-line calls to `a' command, while some implementations
    require a leading newline before the parameter.

    Rewrite calls to `sed' to comply with POSIX interface, and move them
    to helper functions.

    Signed-off-by: Clement Chauplannaz
    Tested-by: "Yann E. MORIN"
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: Yann E. MORIN

    Clement Chauplannaz
     
  • Instead of using "long" for kconfig "hex" and "range" values, which may
    change in size depending on the host architecture, use "long long". This
    will allow values greater than INT_MAX on 32-bit hosts when cross
    compiling.

    Signed-off-by: Kees Cook
    Acked-by: Geert Uytterhoeven
    Tested-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Kees Cook
     
  • scripts/package/builddeb is used to create Debian packages.
    Currently the firmware package always gets the same version number
    irrespective of the Kernel version.
    The paths inside the firmware package depend on the Kernel
    version.

    With the patch supplied the Kernel version becomes part of the
    Debian firmware package number.

    Signed-off-by: Heinrich Schuchardt
    Cc: Ben Hutchings
    Acked-by: maximilian attems
    Signed-off-by: Michal Marek

    Heinrich Schuchardt
     

14 Aug, 2013

1 commit


25 Jul, 2013

1 commit


24 Jul, 2013

4 commits


23 Jul, 2013

4 commits


17 Jul, 2013

1 commit