Staging: lustre: Replace GOTO macro with necessary code
authorTina Johnson <tinajohnson.1234@gmail.com>
Sat, 20 Sep 2014 18:38:05 +0000 (00:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Sep 2014 15:18:41 +0000 (08:18 -0700)
The GOTO macro is neither standard in Linux nor does its definiton
contain much useful code. Hence GOTO can be replaced with useful
parts of its definition. In a statement like GOTO(label, rc), the
replacing code will be goto label if rc is a constant or a variable.
But in cases like GOTO(label, e) where e is an assignment statement,
both assignment and goto statements are kept.

This patch was done using Coccinelle and the following semantic
patch was used:

@@
identifier rc,label;
expression e;
constant c;
@@

(
-GOTO(label,rc = e);
+rc = e;
+goto label;
|
-GOTO(label,rc);
+goto label;
|
-GOTO(label,c);
+goto label;
)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found