14 Feb, 2015

40 commits

  • The patch "module: fix types of device tables aliases" newly requires that
    invocations of

    MODULE_DEVICE_TABLE(type, name);

    come *after* the definition of `name'. That is reasonable, but some
    drivers weren't doing this. Fix them.

    Cc: James Bottomley
    Cc: Andrey Ryabinin
    Cc: David Miller
    Cc: Hans Verkuil
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • After waking up a task waiting for an event, we explicitly mark it as
    TASK_RUNNING (which is necessary as we do the checks for wakeups as
    TASK_INTERRUPTIBLE). Once running and dealing with actually delivering
    the events, we're obviously not planning on calling schedule, thus we can
    relax the implied barrier and simply update the state with
    __set_current_state().

    Signed-off-by: Davidlohr Bueso
    Cc: Alexander Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     
  • Uses of struct of_device_id are most commonly const.

    Suggest using it as such.

    Signed-off-by: Joe Perches
    Acked-by: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Naming the tool that found an issue in the subject line isn't very useful.
    Emit a warning when a common tool (currently checkpatch, sparse or
    smatch) is in the subject line.

    Signed-off-by: Joe Perches
    Suggested-by: Al Viro
    Acked-by: Dan Carpenter
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The preferred style for a commit reference in a commit log is:

    commit ("")

    A recent commit removed this check for parentheses. Add it back.

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

    Joe Perches
     
  • Some prefer code to have spaces around arithmetic so instead of:
    a = b*c+d;
    suggest
    a = b * c + d;

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

    Joe Perches
     
  • Just neatening...

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

    Joe Perches
     
  • Code like:
    if (a < sizeof() &&
    and
    { .len = sizeof() },

    incorrectly emits that warning, so add more exceptions to avoid
    the warning.

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

    Joe Perches
     
  • Improve the format specifier test by removing any %% before looking for
    any remaining % format specifier.

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

    Heba Aamer
     
  • There's a --strict test for these blank lines.

    Add the ability to automatically remove them with --fix.

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

    Joe Perches
     
  • bsd and sysv use different typedefs for unsigned types.

    These are in types.h but not in checkpatch, so add them to checkpatch's
    ability to know types.

    This can avoid false positives for code like:

    void foo(void)
    {
    int x;
    uint y;

    [...];
    }

    where checkpatch incorrectly emits a warning for "missing a blank line
    after declarations".

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

    Joe Perches
     
  • If a git commit description is split on consecutive lines, coalesce it
    before testing.

    This allows:

    commit ("some long
    description")

    Signed-off-by: Joe Perches
    Reported-by: Paul Bolle
    Tested-by: Paul Bolle

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

    Joe Perches
     
  • Add a test for probably likely/unlikely misuses where the comparison is
    likely misplaced

    if (likely(foo) > 0)
    vs
    if (likely(foo > 0))

    Signed-off-by: Joe Perches
    Cc: Christoph Jaeger
    Cc: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The git commit message can be confusing,

    Try to clarify the message a bit to reduce the confusion when emitted.

    Show the correct form using
    Please use git commit description style 'commit ("")'
    and if the git commit sha1 is unique, show
    the right sha1 to use with the actual title

    Signed-off-by: Joe Perches
    Original-patch-by: Prarit Bhargava
    Tested-by: Chris Rorvick
    Acked-by: Prarit Bhargava
    Cc: Daniel Baluta
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Convert all the comments to spaces before testing for single statement
    macros.

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

    Joe Perches
     
  • Discourage the use of keyword 'boolean' for type definition attributes of
    config options as support for it will be dropped later on.

    See http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com

    Signed-off-by: Christoph Jaeger
    Suggested-by: Daniel Borkmann
    Cc: Joe Perches
    Acked-by: Paul Bolle
    Tested-by: Paul Bolle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Jaeger
     
  • KERN_ is never redundant with printk_ratelimited or printk_once.
    (Except perhaps in the sense that you could use e.g. pr_err_ratelimited
    or pr_err_once, but that would apply to printk as well).

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

    Paolo Bonzini
     
  • Just like "__cold", ignore the __pure gcc attribute macro so pointer
    warnings aren't generated for uses like "int * __pure fn(...)"

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

    Joe Perches
     
  • Add world writable permissions tests for the various functions like
    debugfs etc...

    Add $String type for $FuncArg so that string constants are matched.

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

    Joe Perches
     
  • Since commit fe7c36c7bde1 ("Makefile: Build with -Werror=date-time if
    the compiler supports it"), use of __DATE__, __TIME__, and __TIMESTAMP__
    has not been allowed.

    As this test is gcc version specific (> 4.9), it hasn't prevented a few
    new uses from creeping into the kernel sources.

    Make checkpatch complain about them.

    Signed-off-by: Joe Perches
    Original-patch-by: Rasmus Villemoes

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

    Joe Perches
     
  • Now that all bitmap formatting usages have been converted to
    '%*pb[l]', the separate formatting functions are unnecessary. The
    following functions are removed.

    * bitmap_scn[list]printf()
    * cpumask_scnprintf(), cpulist_scnprintf()
    * [__]nodemask_scnprintf(), [__]nodelist_scnprintf()
    * seq_bitmap[_list](), seq_cpumask[_list](), seq_nodemask[_list]()
    * seq_buf_bitmask()

    Signed-off-by: Tejun Heo
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

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

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Cc: Steffen Klassert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    * This is an equivalent conversion but the whole function should be
    converted to use scnprinf famiily of functions rather than
    performing custom output length predictions in multiple places.

    Signed-off-by: Tejun Heo
    Acked-by: Christoph Lameter
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    * Line termination only requires one extra space at the end of the
    buffer. Use PAGE_SIZE - 1 instead of PAGE_SIZE - 2 when formatting.

    Signed-off-by: Tejun Heo
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    * drivers/uwb/drp.c::uwb_drp_handle_alien_drp() was formatting mas.bm
    into a buffer but never used it. Removed.

    Signed-off-by: Tejun Heo
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    * map_show()'s return value is too high by one and the function could
    modify beyond the end of the buffer when the formatted text is long
    enough.

    Signed-off-by: Tejun Heo
    Cc: "James E.J. Bottomley"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    * Line termination only requires one extra space at the end of the
    buffer. Use PAGE_SIZE - 1 instead of PAGE_SIZE - 2 when formatting.

    Signed-off-by: Tejun Heo
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Cc: "John W. Linville"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Cc: Steven Rostedt
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

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

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

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

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    * kernel/cpuset.c::cpuset_print_task_mems_allowed() used a static
    buffer which is protected by a dedicated spinlock. Removed.

    Signed-off-by: Tejun Heo
    Cc: Li Zefan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo