28 Oct, 2010

12 commits


13 Oct, 2010

4 commits


12 Oct, 2010

1 commit


10 Oct, 2010

2 commits

  • Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
    if (input_mode == nonint_oldconfig ||
    input_mode == oldnoconfig) {
    if (input_mode == nonint_oldconfig &&
    sym->name &&
    !sym_is_choice_value(sym)) {
    to avoid oldnoconfig chugging through the else stanza.

    Fix that to restore expected behaviour (which I've confirmed in the
    Fedora kernel build that the configs end up looking the same.)

    Signed-off-by: Kyle McMartin
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Kyle McMartin
     
  • After fixing a use-after-free bug in kconfig, a 'make defconfig' or
    'make allmodconfig' fills the screen with warnings that were not
    detected before. Given that we are close to the release now, disable the
    warnings temporarily and deal with them after 2.6.36.

    Signed-off-by: Michal Marek

    Michal Marek
     

04 Oct, 2010

1 commit


12 Sep, 2010

2 commits

  • When you don't use !E or !I but only !F, then it's very easy to miss
    including some functions, structs etc. in documentation. To help
    finding which ones were missed, allow printing out the unused ones as
    warnings.

    For example, using this on mac80211 yields a lot of warnings like this:

    Warning: didn't use docs for DOC: mac80211 workqueue
    Warning: didn't use docs for ieee80211_max_queues
    Warning: didn't use docs for ieee80211_bss_change
    Warning: didn't use docs for ieee80211_bss_conf

    when generating the documentation for it.

    Signed-off-by: Johannes Berg
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Johannes Berg
     
  • There are valid attributes that could have upper case letters, but we
    still want to remove, like for example
    __attribute__((aligned(NETDEV_ALIGN)))
    as encountered in the wireless code.

    Signed-off-by: Johannes Berg
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

31 Aug, 2010

18 commits

  • Find confusingly indented code in or after an if. An if branch should
    be indented. The code following an if should not be indented.
    Sometimes, code after an if that is indented is actually intended to be
    part of the if branch.

    This has a high rate of false positives, because Coccinelle's column
    calculation does not distinguish between spaces and tabs, so code that
    is not visually aligned may be considered to be in the same column.

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

    Nicolas Palix
     
  • Find duplicate field initializations. This has a high rate of false
    positives due to #ifdefs, which Coccinelle is not aware of in a structure
    initialization.

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

    Nicolas Palix
     
  • alloc contains various semantic patches related
    to the allocation APIs

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

    Nicolas Palix
     
  • Signed-off-by: Nicolas Palix
    Signed-off-by: Julia Lawall
    Signed-off-by: Michal Marek

    Nicolas Palix
     
  • Signed-off-by: Nicolas Palix
    Signed-off-by: Julia Lawall
    Signed-off-by: Michal Marek

    Nicolas Palix
     
  • Use kmemdup_user rather than duplicating its implementation
    This is a little bit restricted to reduce false positives

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

    Nicolas Palix
     
  • Use kmemdup rather than duplicating its implementation

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

    Nicolas Palix
     
  • Use kstrdup rather than duplicating its implementation

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

    Nicolas Palix
     
  • Find a use after free. Values of variables may imply that some
    execution paths are not possible, resulting in false positives.
    Another source of false positives are macros such as
    SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument

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

    Nicolas Palix
     
  • list_for_each_entry uses its first argument to get from one element of
    the list to the next, so it is usually not a good idea to reassign it.
    The first rule finds such a reassignment and the second rule checks
    that there is a path from the reassignment back to the top of the loop.

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

    Nicolas Palix
     
  • Many iterators have the property that the first argument is always bound
    to a real list element, never NULL. False positives arise for some
    iterators that do not have this property, or in cases when the loop
    cursor is reassigned. The latter should only happen when the matched
    code is on the way to a loop exit (break, goto, or return).

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

    Nicolas Palix
     
  • for_each_node iterators only exit normally when the loop cursor is
    NULL, so there is no point to call of_node_put on the final value.

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

    Nicolas Palix
     
  • Find missing unlocks. This semantic match considers the specific case
    where the unlock is missing from an if branch, and there is a lock
    before the if and an unlock after the if. False positives are due to
    cases where the if branch represents a case where the function is
    supposed to exit with the lock held, or where there is some preceding
    function call that releases the lock.

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

    Nicolas Palix
     
  • Find double locks. False positives may occur when some paths cannot
    occur at execution, due to the values of variables, and when there is
    an intervening function call that releases the lock.

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

    Nicolas Palix
     
  • Find functions that refer to GFP_KERNEL but are called with locks held.
    The proposed change of converting the GFP_KERNEL is not necessarily the
    correct one. It may be desired to unlock the lock, or to not call the
    function under the lock in the first place.

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

    Nicolas Palix
     
  • deref_null.cocci is moved to the 'null' directory
    which contains other null related rules.

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

    Nicolas Palix
     
  • This semantic patch looks for kmalloc etc that are not followed by a
    NULL check. It only gives a report in the case where there is some
    error handling code later in the function, which may be helpful
    in determining what the error handling code for the call to kmalloc etc
    should be.

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

    Nicolas Palix
     
  • The various basic memory allocation functions don't return ERR_PTR

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

    Nicolas Palix