lkml.org 
[lkml]   [2007]   [Dec]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 04 Dec 2007 00:33:52 -0800 (PST)
SubjectRe: [PATCH 2/3] arch/sparc: Add missing of_node_put
FromDavid Miller <>
From: Julia Lawall <julia@diku.dk>
Date: Sun, 2 Dec 2007 21:05:24 +0100 (CET)

> From: Julia Lawall <julia@diku.dk>
> 
> There should be an of_node_put when breaking out of a loop that iterates
> using for_each_node_by_type.
> 
> This was detected and fixed using the following semantic patch.
> (http://www.emn.fr/x-info/coccinelle/)
> 
> // <smpl>
> @@
> identifier d;
> type T;
> expression e;
> iterator for_each_node_by_type;
> @@
> 
> T *d;
> ...
> for_each_node_by_type(d,...)
>   {... when != of_node_put(d)
>        when != e = d
> (
>    return d;
> |
> +  of_node_put(d);
> ?  return ...;
> )
> ...}
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>

Applied, but I had to fixup the trailing whitespace on this line:

> -		if (!err)
> +		if (!err) {			 

As indicated by GIT:

Adds trailing whitespace.
diff:9:		if (!err) {			 
warning: 1 line adds whitespace errors.
Please correct these kinds of errors before submitting in
the future, thanks.


\
 
 \ /
  Last update: 2007-12-04 09:37    [from the cache]
©2003-2008