27 Oct, 2010

40 commits

  • Throw an error when a source file has been given execute permissions using
    the mode change line present in git diffs. Also alow the filename
    matching to use the "diff" line in addition to the "+++" line, since the
    mode change lines appear before any "+++" lines.

    [apw@canonical.com: simplified filename logic slightly, added tests]
    Cc: Andy Whitcroft
    Acked-by: Linus Walleij
    Signed-off-by: Rabin Vincent
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rabin Vincent
     
  • When checking the length of the help we need to be sure we are seeing the
    whole story before erroring. Firstly we only want to check when adding
    the help in the first place. Second we need to be sure that we are seeing
    the end of the entry, nominally when there is no context below or that
    context shows the start of the next entry.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Commonise the code for missing spaces after struct, union, and enum such
    that they share the same code. Ensure we cover all the common cases in
    each case. Check against the sanitised line to ensure we do not report on
    comments and strings.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • Add spacing checks for struct, union, and enum definitions. Check the
    spacing after type and before the equals (=) and open brace ({).

    Based on a patch by Joe Perches.

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

    Andy Whitcroft
     
  • Add a (strict mode only) test to check for non-negative returns of what
    appear to be errno values as the majority case these should indeed be
    negative.

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

    Andy Whitcroft
     
  • The following incantation is triggering categorisation of its colon (:) as
    a binary form, which it is not:

    return foo ? (s8)bar : baz;

    Handle casts differently from types in the categoriser, allowing us to
    better track (s8)bar as a value and not a declaration.

    Reported-by: Jean Delvare
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When determining if a return () sequence is a function style bracketing we
    simplify the expression one bracket at a time replacing each with a
    constant. However this can trigger a false merge with expressions as
    below:

    return (foo)0;

    Prevent this false merging.

    Reported-by: Hitoshi Mitake
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When we hit types of whitespace which may be fixed by scripts/cleanpatch
    and scripts/cleanfile suggest their use in our report.

    Suggested-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • When the following form is used we have a type which fully fills a line.
    This means that a type may end at the end of line as well as at the
    following identifier.

    int **
    foo;

    Reported-by: Daniel Walker
    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • The patch "checkpatch: fix handling of leading spaces" added checks for
    leading spaces on lines, but this introduces regressions. Firstly it does
    not correctly detect when we are in a comment. Secondly it does not allow
    for preprocessor command spacing. Finally it does not allow for label
    indentation which is required to be less than one tab. Fix these up:

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • The current implementation of div64_u64 for 32bit systems returns an
    approximately correct result when the divisor exceeds 32bits. Since doing
    64bit division using 32bit hardware is a long since solved problem we just
    use one of the existing proven methods.

    Additionally, add a div64_s64 function to correctly handle doing signed
    64bit division.

    Addresses https://bugzilla.redhat.com/show_bug.cgi?id=616105

    Signed-off-by: Brian Behlendorf
    Signed-off-by: Oleg Nesterov
    Cc: Ben Woodard
    Cc: Jeremy Fitzhardinge
    Cc: Mark Grondona
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Behlendorf
     
  • Use new variable 'len' to make code more readable.

    Signed-off-by: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • this_cpu_ptr() avoids an array lookup and can use the percpu offset of the
    local cpu directly.

    Signed-off-by: Christoph Lameter
    Cc: Eric Dumazet
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Improve 'lib_sort()' test and check that:
    o 'cmp()' is called only for elements which were present in the original list,
    i.e., the 'a' and 'b' parameters are valid
    o the resulted (sorted) list consists onlly of the original elements
    o intdoruce "poison" fields to make sure data around 'struc list_head' field
    are not corrupted.

    Signed-off-by: Artem Bityutskiy
    Cc: Don Mullis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • This patch unifies 'list_sort_test()' messages a bit and makes sure all of
    them start with the "list_sort_test:" prefix to make it obvious for users
    where the messages come from.

    Signed-off-by: Artem Bityutskiy
    Cc: Don Mullis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • The 'lib_sort()' test does not free memory if it fails, and it makes the
    kernel panic if it cannot allocate memory. This patch fixes the problem.

    This patch also changes several small things:
    o use 'list_add()' helper instead of adding manually
    o introduce temporary 'el1' variable to avoid ugly and unreadalbe
    "if" statement
    o make 'head' to be stack variable instead of 'kmalloc()'ed, which
    simplifies code a bit

    Overall, this patch is of clean-up type.

    Signed-off-by: Artem Bityutskiy
    Cc: Don Mullis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • Instead of using own pseudo-random generator, use generic linux
    'random32()' function. Presumably, this should improve test coverage.

    At the same time, do the following changes:
    o Use shorter macro name for test list length
    o Do not use strange 'l_h' name for 'struct list_head' element,
    use 'list', because it is traditional name and thus, makes the
    code more obvious and readable.

    Signed-off-by: Artem Bityutskiy
    Cc: Don Mullis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • I do not see any reason to use KERN_WARN for normal messages and
    KERN_EMERG for error messages in the lib_sort testing routine. Let's use
    more reasonable KERN_NORM and KERN_ERR levels.

    Signed-off-by: Artem Bityutskiy
    Cc: Don Mullis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • While hunting a non-existing bug in 'list_sort()', I've improved the
    'list_sort_test()' function which tests the 'list_sort()' library call.
    Although at the end I found a bug in my code, but not in 'list_sort()', I
    think my clean-ups and improvements are worth merging because they make
    the test function better.

    This patch:

    Make the self-tests selectable via Kconfig rather than by manual enabling
    of DEBUG_LIST_SORT.

    Signed-off-by: Artem Bityutskiy
    Cc: Don Mullis
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • All percpu counters are linked to a global list on initialization and
    removed from it on destruction. The list is walked during CPU up/down.
    If a percpu counter is freed without being properly destroyed, the system
    will oops only on the next CPU up/down making it pretty nasty to track
    down. This patch adds debugobj support for percpu counters so that such
    problems can be found easily.

    As percpu counters don't make sense on stack and can't be statically
    initialized, debugobj support is pretty simple. It's initialized and
    activated on counter initialization, and deactivatd and destroyed on
    counter destruction. With this patch applied, the bug fixed by commit
    602586a83b719df0fbd94196a1359ed35aeb2df3 (shmem: put_super must
    percpu_counter_destroy) triggers the following warning on tmpfs unmount
    and the system won't oops on the next cpu up/down operation.

    ------------[ cut here ]------------
    WARNING: at lib/debugobjects.c:259 debug_print_object+0x5c/0x70()
    Hardware name: Bochs
    ODEBUG: free active (active state 0) object type: percpu_counter
    Modules linked in:
    Pid: 3999, comm: umount Not tainted 2.6.36-rc2-work+ #5
    Call Trace:
    [] warn_slowpath_common+0x7f/0xc0
    [] warn_slowpath_fmt+0x46/0x50
    [] debug_print_object+0x5c/0x70
    [] debug_check_no_obj_freed+0x125/0x210
    [] kfree+0xb3/0x2f0
    [] shmem_put_super+0x1d/0x30
    [] generic_shutdown_super+0x56/0xe0
    [] kill_anon_super+0x16/0x60
    [] kill_litter_super+0x27/0x30
    [] deactivate_locked_super+0x45/0x60
    [] deactivate_super+0x4a/0x70
    [] mntput_no_expire+0x86/0xe0
    [] sys_umount+0x6f/0x360
    [] system_call_fastpath+0x16/0x1b
    ---[ end trace cce2a341ba3611a7 ]---

    Signed-off-by: Tejun Heo
    Acked-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Despite the idr_pre_get() kernel-doc, there are some cases where you can
    call idr_pre_get() from within locked regions. Add a description for such
    cases.

    See also: http://lkml.org/lkml/2010/9/16/462

    [akpm@linux-foundation.org: cleanups, grammatical fixes]
    Signed-off-by: Naohiro Aota
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naohiro Aota
     
  • Signed-off-by: Andy Shevchenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Add missing git as a prefix for git repositories in the few places it
    wasn't already used.

    Convert a space delimiter to a tab.

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

    Joe Perches
     
  • Removed by commit 0d58cef664e01f ("V4L/DVB: Remove obsolete zc0301 v4l
    driver").

    Signed-off-by: Joe Perches
    Acked-by: Amerigo Wang
    Cc: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Removed by commit 7373ab3669aec93 ("V4L/DVB: Remove obsolete ov511
    driver").

    Signed-off-by: Joe Perches
    Acked-by: Amerigo Wang
    Cc: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Removed by commit 431107ea5b680a24a ("ARM: S3C64XX: Merge mach-s3c6400 and
    mach-s3c6410").

    Signed-off-by: Joe Perches
    Acked-by: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Removed by commit 70556b143ae4c ("ARM: S3C24XX: Remove old mach-s3c2442").

    Signed-off-by: Joe Perches
    Acked-by: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Removed by commit dcd925f95194da4 ("pxa: merge stargate2 and imote2 board
    files").

    Signed-off-by: Joe Perches
    Acked-by: Jonathan Cameron
    Acked-by: Eric Miao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The original commit 403d29713e0a ("pxa/income: Add Income SBC support")
    started with the wrong file pattern.

    Signed-off-by: Joe Perches
    Acked-by: Marek Vasut
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Fix a defect with the first mailing list address being used for each
    subsequent mailing list.

    Updated to 0.26-beta6.

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use Florian Mickler's mailmap routine to reduce name duplication.

    o Add subroutine deduplicate_email to centralize code
    o Add hashes for deduplicate_(name|address)_hash
    o Remove now unused @interactive_to
    o Whitespace neatening
    o Add command line --help text
    o Add --mailmap command line option control
    o Interactive changes:
    - Add toggles for maintainer, git and list selections
    - Default selection is all
    - Add mailmap control

    Update to 0.26-beta5

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • And a miscellaneous conversion of You to you in a help message

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Implement it, like it is described in git-shortlog.

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

    Florian Mickler
     
  • Case insensitive name and email address matching can help reduce
    duplication when authors don't always use the exact same signature.

    o Add a --interactive per-file exact_match hash so git history
    can be checked on per-file only when there is no direct maintainer
    o Make @interactive_to list global so save_commits_by_ can check
    email names & addresses against this list for duplication
    o Don't allow --interactive and --sections
    o rename subroutine get_maintainer to get_maintainers
    o Added help text option to --interactive menu prompt

    Update version to 0.26-beta4

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • o Added searching by git-blame as well as git-history
    o Added different selection toggles
    o Added ability to list commits by author or by sign-off-type
    o Use custom git and hg formats to make searching for subject/author
    a bit easier.
    o Move inlined section matching and searching git/hg history to
    new get_maintainer subroutine
    o Added subroutines save_commits_by_author and save_commits_by_signer
    o Removed subroutines vcs_get_shortlog and vcs_email_shortlog
    o Rename camelcase signaturePattern to signature_pattern

    Update to 0.26 beta3

    Signed-off-by: Joe Perches
    Cc: Florian Mickler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • This is a first version of an interactive mode for
    scripts/get_maintainer.pl.

    It allows the user to interact with the script. Each cc candidate can be
    selected and deselected and a shortlog of authored commits can be
    displayed for each candidate.

    The menu is displayed via STDERR, the end result is outputted to STDOUT.
    This unusual mechanism allows using get_maintainer.pl in interactive mode
    via git send-email --cc-cmd.

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

    Florian Mickler
     
  • On Mon, 2010-09-13 at 00:01 -0400, Valdis.Kletnieks@vt.edu wrote:
    > Any chance of getting that to be ~/.get_maintainer.conf rather than
    > ./.get_maintainer.conf? I've just gotten bit like the 3rd or 4th time by
    > "oh but you didn't create that file in *this* tree"
    > (I usually have a linus git tree, a linux-next tree, and 3-4 -mm trees)

    Sure.

    Add a search path for the .conf file.

    3 paths are added:

    . customized per-tree configurations
    $HOME user global configuration when per-tree configs don't exist
    ./scripts lk defaults to override script

    Signed-off-by: Joe Perches
    Cc: Valdis Kletnieks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Adding commit signers when there is a listed MAINTAINER for a file
    can make the output list longer than necessary.

    Change the --git default from on to off.

    Add a new --git-fallback option (default on) used to add commit signers
    only when there is no MAINTAINER for a file.

    git history is used when --git-fallback is enabled and the pattern
    directory depth is not the same as the file directory depth.

    For instance:

    X86 ARCHITECTURE (32-BIT AND 64-BIT)
    M: Thomas Gleixner
    M: Ingo Molnar
    M: "H. Peter Anvin"
    M: x86@kernel.org
    T: git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
    S: Maintained
    F: Documentation/x86/
    F: arch/x86/

    If using "./scripts/get_maintainer -f arch/x86/lib/atomic64_32.c", the pattern
    for "arch/x86/" does not match the directory depth of "arch/x86/lib"
    so the MAINTAINERS entries and git history is used to produce:

    $ ./scripts/get_maintainer.pl -f --rolestats arch/x86/lib/atomic64_32.c
    Thomas Gleixner (maintainer:X86 ARCHITECTURE...)
    Ingo Molnar (maintainer:X86 ARCHITECTURE...)
    "H. Peter Anvin" (maintainer:X86 ARCHITECTURE...,commit_signer:1/1=100%)
    x86@kernel.org (maintainer:X86 ARCHITECTURE...)
    Luca Barbieri (commit_signer:1/1=100%)
    linux-kernel@vger.kernel.org (open list)

    Luca Barbieri is added because he signed the only commit to
    arch/x86/lib/atomic64_32.c during the last year and he meets the
    other default qualifications.
    --git-min-percent (default:10)
    --git-min-signatures (default:1)

    If current users of ./scripts/get_maintainers.pl have scripts
    that use --nogit that expect git history to be excluded, those
    scripts should be updated to include --nogit-fallback or a
    .get_maintainer.conf file should be created with --nogit-fallback.

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

    Joe Perches
     
  • Keyword matching uses K: patterns from MAINTAINERS, so if looking for the
    MAINTAINERS maintainer, don't search MAINTAINERS for pattern matches.
    MAINTAINERS also has rather a lot of email addresses and is easily
    searched using grep "^M:", so skip it.

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

    Joe Perches
     
  • Fix an overly indented block.

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

    Joe Perches