From: Julia Lawall Date: Sat, 30 Aug 2014 14:24:55 +0000 (+0200) Subject: staging: lustre: llite: expand the GOTO macro X-Git-Tag: fixes-for-v3.18-merge-window~15^2~1142 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34e1f2bb1e7ab87c2b950189f7ccae57a72f25a8;p=pandora-kernel.git staging: lustre: llite: expand the GOTO macro The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; @@ if (...) GOTO(lbl,...); +else GOTO(lbl,...); @@ identifier lbl,rc; constant c; expression e,e1; @@ if ( - e + !e ) - GOTO(lbl,\(rc\|c\)); -else GOTO(lbl,e1); + e1; +goto lbl; @@ identifier lbl,rc; constant c; expression e,e1; @@ if (e) - GOTO(lbl,e1); -else GOTO(lbl,\(rc\|c\)); + e1; +goto lbl; @@ identifier lbl; expression e,e1,e2; @@ if (e) - GOTO(lbl,e1); -else GOTO(lbl,e2); + e1; +else e2; +goto lbl; // ------------------------------------------------------------------------ @@ identifier lbl,rc; constant c; @@ - GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ - GOTO(lbl,rc); + rc; + goto lbl; // The rules above the line deal with the case where the goto desination is the same whether or not the the branch is taken. In that case, the goto is created in just one instance after the if. This affects only the files namei.c and llite_lib.c. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed