22 Jul, 2016

1 commit


18 Feb, 2016

1 commit


27 Oct, 2015

1 commit


04 Jul, 2013

1 commit


14 Jul, 2012

1 commit


15 Jan, 2012

1 commit


31 Aug, 2010

3 commits

  • 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