11 Jul, 2013

3 commits

  • Pull coccinelle updates from Michal Marek:
    "The misc branch is reserved for Coccinelle this time:

    - 'report' is the default mode
    - MAINTAINERS update for Coccinelle
    - documentation udate
    - use new option format for spatch(1)
    - J= variable to mimic make -j for coccicheck
    - check for missing pci_free_consistent() calls

    There are some patches for rpm-pkg and deb-pkg waiting for the
    3.12-rc1 merge window"

    * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Coccinelle: Update information about the minimal version required
    Coccinelle: Update the options used to the new option scheme
    scripts: Coccinelle script for pci_free_consistent()
    Coccinelle: Update the documentation
    Coccinelle: Update section of MAINTAINERS
    coccicheck: span checks across CPUs
    scripts/coccinelle: check for field address argument to kfree
    Coccinelle: Update the Coccinelle section of MAINTAINERS
    Coccinelle: Make 'report' the default mode

    Linus Torvalds
     
  • Pull kconfig updates from Michal Marek:
    - dependency solver fix for make defconfig
    - randconfig fixes, one of which had to be reverted again
    - more user-friendly sorting of search results
    - hex and range keywords support longs
    - fix for [mn]conf not to rely on particular behavior of the LINES and
    COLS variables
    - cleanup of magic constants in kconfig/lxdialog
    - [mn]conf formatting fixes
    - fix for scripts/config's help text in out-of-tree usage (under a
    different name)

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: allow "hex" and "range" to support longs
    Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"
    kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
    kconfig: loop as long as we changed some symbols in randconfig
    kconfig/[mn]conf: make it explicit in the search box that a regexp is possible
    kconfig: sort found symbols by relevance
    kconfig/conf: print the seed used to initialise the RNG for randconfig
    kconfig/conf: accept a base-16 seed for randconfig
    kconfig/conf: fix randconfig setting multiple symbols in a choice
    scripts/config: replace hard-coded script name by a dynamic value
    mconf/nconf: mark empty menus/menuconfigs different from non-empty ones
    nconf: use function calls instead of ncurses' variables LINES and COLS
    mconf: use function calls instead of ncurses' variables LINES and COLS
    kconfig/lxdialog: handle newline characters in print_autowrap()
    kconfig/lxdialog: Use new mininimum resize definitions in conf_choice()
    kconfig/lxdialog: Add definitions for mininimum (re)size values
    kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on

    Linus Torvalds
     
  • Pull kbuild updates from Michal Marek:
    - fix for make headers_install argv explosion with too long path
    - scripts/setlocalversion does not call git update-index needlessly
    - fix for the src.rpm produced by make rpm-pkg. The new make
    image_name can be useful also for other packaging tools.
    - scripts/mod/devicetable-offsets.o is not rebuilt during each make run
    - make modules_install dependency fix
    - scripts/sortextable portability fix
    - fix for kbuild to generate the output directory for all object files
    in subdirs.
    - a couple of minor fixes

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: create directory for dir/file.o
    tools/include: use stdint types for user-space byteshift headers
    Makefile: Fix install error with make -j option
    Fix a build warning in scripts/mod/file2alias.c
    improve modalias building
    scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/
    kbuild: fix error when building from src rpm
    scripts/setlocalversion on write-protected source tree
    Makefile.lib: align DTB quiet_cmd
    kbuild: fix make headers_install when path is too long

    Linus Torvalds
     

10 Jul, 2013

2 commits

  • Add support for extracting LZ4-compressed kernel images, as well as
    LZ4-compressed ramdisk images in the kernel boot process.

    Signed-off-by: Kyungsik Lee
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Russell King
    Cc: Borislav Petkov
    Cc: Florian Fainelli
    Cc: Yann Collet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyungsik Lee
     
  • Might as well check include timestamps and cache the include file
    CamelCase uses for the non-git case too.

    The camelcase cache file is now named:

    for git: .checkpatch-camelcase.git.
    for non-git: .checkpatch-camelcase.date.

    All .checkpatch-camelcase* files are deleted if not current.

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

    Joe Perches
     

08 Jul, 2013

1 commit

  • Pull first stage of __cpuinit removal from Paul Gortmaker:
    "The two commits here 1) dummy out all the __cpuinit macros so that we
    no longer generate such sections, and then 2) remove all the section
    processing that we used to do for those sections.

    This makes all the __cpuinit and friends no-ops, so that we can remove
    the use cases of it at our leisure. Expect stage 2, which does the
    tree wide removal sweep at the end of the merge window."

    * 'cpuinit-delete' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    modpost: remove all traces of cpuinit/cpuexit sections
    init.h: remove __cpuinit sections from the kernel

    Linus Torvalds
     

04 Jul, 2013

26 commits

  • Merge first patch-bomb from Andrew Morton:
    - various misc bits
    - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
    distracted. There has been quite a bit of activity.
    - About half the MM queue
    - Some backlight bits
    - Various lib/ updates
    - checkpatch updates
    - zillions more little rtc patches
    - ptrace
    - signals
    - exec
    - procfs
    - rapidio
    - nbd
    - aoe
    - pps
    - memstick
    - tools/testing/selftests updates

    * emailed patches from Andrew Morton : (445 commits)
    tools/testing/selftests: don't assume the x bit is set on scripts
    selftests: add .gitignore for kcmp
    selftests: fix clean target in kcmp Makefile
    selftests: add .gitignore for vm
    selftests: add hugetlbfstest
    self-test: fix make clean
    selftests: exit 1 on failure
    kernel/resource.c: remove the unneeded assignment in function __find_resource
    aio: fix wrong comment in aio_complete()
    drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
    drivers/memstick/host/r592.c: convert to module_pci_driver
    drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
    pps-gpio: add device-tree binding and support
    drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
    drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
    drivers/parport/share.c: use kzalloc
    Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
    aoe: update internal version number to v83
    aoe: update copyright date
    aoe: perform I/O completions in parallel
    ...

    Linus Torvalds
     
  • Add RapidIO-specific modalias generation to enable udev notifications
    about RapidIO-specific events.

    The RapidIO modalias string format is shown below:

    "rapidio:vNNNNdNNNNavNNNNadNNNN"

    Where:
    v - Device Vendor ID (16 bit),
    d - Device ID (16 bit),
    av - Assembly Vendor ID (16 bit),
    ad - Assembly ID (16 bit),

    as they are reported in corresponding Capability Registers (CARs)
    of each RapidIO device.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Li Yang
    Cc: Kumar Gala
    Cc: Andre van Herk
    Cc: Micha Nelissen
    Cc: Stef van Os
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • Add a file to cache the CamelCase variables found by to reduce
    the time it takes to scan the include/ directory.

    Filename is '.checkpatch-camelcase.' and it is created only only
    if a .git directory exists.

    is determined by the last non-merge commit id in the
    include/ path.

    Reduces checkpatch run time by ~12 cpu seconds on my little netbook.

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

    Joe Perches
     
  • The current $logFunction regular expression allows names like dev_warn,
    e_dbg, netdev_info, etc, but some log functions are now written like
    e_dev_warn, so allow 1 or 2 word blocks with an underscore before the
    logging level.

    Signed-off-by: Jacob Keller
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jacob Keller
     
  • When using --strict, CamelCase uses are described with CHECK: messages.
    These CamelCase uses may be acceptable and should not generate these
    messages when the variable is already defined in a file from the
    include/... path.

    So, change checkpatch to read all the .h files in include/... and look
    for preexisting CamelCase #defines, typedefs and function prototypes.

    Add these to the existing camelcase hash so that any uses in the patch or
    file can be ignored.

    There are currently ~3500 files in include/. It takes about 10 cpu
    seconds on my little netbook to grep for and preseed these existing uses.

    That's about 4x the time for a similar git grep.

    This preseeding is only done once when using --strict and only when there
    is a CamelCase use found.

    If a .git directory is found, it uses 'git ls-files include' If not, it
    uses 'find $root/include -name "*.h"

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

    Joe Perches
     
  • Many existing variable names use SI like variants that should be otherwise
    obvious and acceptable.

    Whitelist them from the CamelCase message.

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

    Joe Perches
     
  • Moving this test allows the --fix option to work better.

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

    Joe Perches
     
  • Some patches have simple defects in whitespace and formatting that
    checkpatch could correct automatically. Attempt to do so.

    Add a --fix option to create a ".EXPERIMENTAL-checkpatch-fixes"
    file that tries to use normal kernel style for some of these formatting
    errors.

    Add warnings against using this file without verifying the changes.

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

    Joe Perches
     
  • Some false positives exist on this test.

    For instance:
    *va_arg(args, signed char *) = val.s;
    or
    memset(foo, 0, sizeof(struct bar *) * baz));

    Ignore lines that have an arithmetic operator or assignment
    after what appears to be a cast to a pointer "(foo *)".

    Add $Arithmetic convenience variable.

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

    Joe Perches
     
  • Comparing to true or false is error prone.

    Add tests for the various forms of (foo == true) && (false != bar)
    that are only reported with --strict.

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

    Joe Perches
     
  • Check to make sure the blank lines aren't comment lines like:

    bool foo(bool bar)
    {
    /* Don't warn on a leading comment */
    return !bar;
    /* Don't warn on a trailing comment either */
    }

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

    Joe Perches
     
  • Figure out first how to determine if this is in a struct declaration or in
    a function body before enabling this.

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

    Joe Perches
     
  • Allow "#define foo struct.member" without bleating a warning.

    This also allows "#define foo bar.baz->qux" and so on.

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

    Joe Perches
     
  • Comparing get_jiffies_64() is almost always wrong and time_before64 and
    time_after64 should be used instead.

    Warn on any comparison to get_jiffies_64().

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

    Joe Perches
     
  • Comparing jiffies is almost always wrong and time_before and time_after
    should be used instead.

    Warn on any comparison to jiffies.

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

    Joe Perches
     
  • Some block comments in network are written as:

    /* block comment line 1
    block comment line 2
    */

    Emit a warning on the "block comment line 2" because it should be

    /* block comment line 1
    * block comment line 2
    */

    This warning is only emitted on the second line of a block comment.

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

    Joe Perches
     
  • Show the first line of the comment after a line with just /* to better
    show where the defective comment style is in the file.

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

    Joe Perches
     
  • Commit be987d9f80 ("checkpatch: improve CamelCase test for Page") added
    it but it shouldn't be there. Must have been my fault.

    Make sure that the tested variable doesn't contain a constant.

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

    Joe Perches
     
  • Add another test for memory allocation style to follow
    Documentation/CodingStyle:

    Chapter 14: Allocating memory

    The preferred form for passing a size of a struct is the following:

    p = kmalloc(sizeof(*p), ...);

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

    Joe Perches
     
  • The gcc extension for binary constants that start with 0b is only
    supported with gcc version 4.3 or higher.

    The kernel can still be compiled with earlier versions of gcc, so have
    checkpatch emit a warning for these constants.

    Restructure checkpatch's constant finding code a bit to support finding
    these binary constants.

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

    Joe Perches
     
  • Do not bleat a message on nominally acceptable CamelCase uses that are
    separated by an _ like drm_core_has_MTRR.

    CamelCase tests are also a bit noisy against certain types of code
    acceptable to some kernel developers.

    Make the test applicable only with --strict.

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

    Joe Perches
     
  • The naming convention of options has changed one year ago.
    The options have been recently updated in the cocci file
    and in scripts/coccicheck. This patch also adds this information
    in the documentation.

    Signed-off-by: Nicolas Palix
    Signed-off-by: Michal Marek

    Nicolas Palix
     
  • spatch has changed its option scheme.
    E.g., --no_show_diff is now --no-show-diff

    This patch updates:
    - scripts/coccicheck
    - Semantic patches under scripts/coccinelle/

    Signed-off-by: Nicolas Palix
    Signed-off-by: Michal Marek

    Nicolas Palix
     
  • When add a obj with dir to obj-y, like this

    obj-y += dir/file.o

    The $(obj)/dir not created, this patch fix this.

    When try to add a file(which in a subdir) to my board's obj-y, the build
    progress crashed.

    For example, I use at91rm9200ek board, and in kernel dir run:

    mkdir objtree
    make O=objtree at91rm9200_defconfig
    mkdir arch/arm/mach-at91/dir
    touch arch/arm/mach-at91/dir/file.c

    and edit arch/arm/mach-at91/dir/file.c to add some code.
    then edit arch/arm/mach-at91/Makefile, change the following line:

    obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o

    to:

    obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o dir/file.o

    Now build it:

    make O=objtree

    Then the error appears:
    ...
    CC arch/arm/mach-at91/board-rm9200dk.o
    CC arch/arm/mach-at91/board-rm9200ek.o
    CC arch/arm/mach-at91/dir/file.o
    linux-2.6/arch/arm/mach-at91/dir/file.c:5:
    fatal error: opening dependency file
    arch/arm/mach-at91/dir/.file.o.d: No such file or directory

    Check the objtree:
    LANG=en ls objtree/arch/arm/mach-at91/dir
    ls: cannot access objtree/arch/arm/mach-at91/dir: No such file or directory

    It's apparently that the target dir not created for file.o

    Check kbuild source code. It seems that kbuild create dirs for that in
    $(obj-dirs). But if the dir need not to create a built-in.o, It should
    never in $(obj-dirs).

    So I make this patch to make sure It in $(obj-dirs)

    this bug caused by commit
    f5fb976520a53f45f8bbf2e851f16b3b5558d485

    Signed-off-by: 张忠山
    Signed-off-by: Michal Marek

    张忠山
     
  • Linus Torvalds
     
  • Pull ARM64 updates from Catalin Marinas:
    "Main features:
    - KVM and Xen ports to AArch64
    - Hugetlbfs and transparent huge pages support for arm64
    - Applied Micro X-Gene Kconfig entry and dts file
    - Cache flushing improvements

    For arm64 huge pages support, there are x86 changes moving part of
    arch/x86/mm/hugetlbpage.c into mm/hugetlb.c to be re-used by arm64"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64: (66 commits)
    arm64: Add initial DTS for APM X-Gene Storm SOC and APM Mustang board
    arm64: Add defines for APM ARMv8 implementation
    arm64: Enable APM X-Gene SOC family in the defconfig
    arm64: Add Kconfig option for APM X-Gene SOC family
    arm64/Makefile: provide vdso_install target
    ARM64: mm: THP support.
    ARM64: mm: Raise MAX_ORDER for 64KB pages and THP.
    ARM64: mm: HugeTLB support.
    ARM64: mm: Move PTE_PROT_NONE bit.
    ARM64: mm: Make PAGE_NONE pages read only and no-execute.
    ARM64: mm: Restore memblock limit when map_mem finished.
    mm: thp: Correct the HPAGE_PMD_ORDER check.
    x86: mm: Remove general hugetlb code from x86.
    mm: hugetlb: Copy general hugetlb code from x86 to mm.
    x86: mm: Remove x86 version of huge_pmd_share.
    mm: hugetlb: Copy huge_pmd_share from x86 to mm.
    arm64: KVM: document kernel object mappings in HYP
    arm64: KVM: MAINTAINERS update
    arm64: KVM: userspace API documentation
    arm64: KVM: enable initialization of a 32bit vcpu
    ...

    Linus Torvalds
     

03 Jul, 2013

3 commits

  • Created coccinelle script for reporting missing pci_free_consistent() calls.

    Signed-off-by: Petr Strnad
    Signed-off-by: Nicolas Palix
    Signed-off-by: Michal Marek

    strnape1@fel.cvut.cz
     
  • This adds parallelism by default to the "coccicheck" target using
    spatch's "-max" and "-index" arguments.

    Signed-off-by: Kees Cook
    Signed-off-by: Nicolas Palix
    Signed-off-by: Michal Marek

    Kees Cook
     
  • On some systems, __used is already defined in sys/cdefs.h and causes
    a build warning:

    scripts/mod/file2alias.c:85:1: warning: "__used" redefined
    In file included from /usr/include/stdio.h:64,
    from scripts/mod/modpost.h:1,
    from scripts/mod/file2alias.c:13:
    /usr/include/sys/cdefs.h:146:1: warning: this is the location of the previous definition

    This adds an extra check before defining the __used macro to see if
    the macro was already defined elsewhere.

    Signed-off-by: Daniel Tang
    Signed-off-by: Michal Marek

    Daniel Tang
     

29 Jun, 2013

1 commit

  • The parsing routines for Kconfig files use strtol(), but store and
    render values as int. Switch types and formating to long to support a
    wider range of values. For example, 0x80000000 wasn't representable.

    Signed-off-by: Kees Cook
    Tested-by: "Yann E. MORIN"
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Kees Cook
     

28 Jun, 2013

2 commits


27 Jun, 2013

1 commit

  • Delete all audit rules that were checking how the .cpuXYZ
    related sections were inter-operating with other __init
    like sections, now that __cpuinit is gone. Update the linker
    script to not have any knowledge of .cpuinit sections.

    [lds.h update courtesy of Ralf Baechle ]

    Cc: Arnd Bergmann
    Cc: Rusty Russell
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

26 Jun, 2013

1 commit