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)
commit26c4ea46a55c9056fa20e3c91b1989f3cd9473d7
tree3e5eb27d00f22864569a6418059c0aafcdd06b97
parentddcb81e7419baa90fab79dbbb1b983a69a235c91
Staging: lustre: Replace GOTO macro with necessary code

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>
drivers/staging/lustre/lustre/osc/osc_request.c
This page took 0.027951 seconds and 5 git commands to generate.