summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/ptlrpc/niobuf.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2014-09-07 18:18:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-08 12:49:17 -0700
commita9b3e8f30e33d3542b00edcf0641d031b80967cb (patch)
tree8c648d6120ba7858aeaa5588554010a1e221301e /drivers/staging/lustre/lustre/ptlrpc/niobuf.c
parentd212afd9458a04f6c16f3d5d701593b915d526b0 (diff)
staging: lustre: ptlrpc: expand the GOTO macro
The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier lbl; identifier rc; constant c; @@ - GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ - GOTO(lbl,rc); + rc; + goto lbl; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/niobuf.c')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/niobuf.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c
index 8fb37f03433f..0067e0612ba6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c
@@ -537,13 +537,13 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
rc = sptlrpc_cli_wrap_request(request);
if (rc)
- GOTO(out, rc);
+ goto out;
/* bulk register should be done after wrap_request() */
if (request->rq_bulk != NULL) {
rc = ptlrpc_register_bulk(request);
if (rc != 0)
- GOTO(out, rc);
+ goto out;
}
if (!noreply) {
@@ -560,7 +560,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
request->rq_err = 1;
spin_unlock(&request->rq_lock);
request->rq_status = rc;
- GOTO(cleanup_bulk, rc);
+ goto cleanup_bulk;
}
} else {
request->rq_repdata = NULL;
@@ -573,7 +573,8 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
if (rc != 0) {
CERROR("LNetMEAttach failed: %d\n", rc);
LASSERT(rc == -ENOMEM);
- GOTO(cleanup_bulk, rc = -ENOMEM);
+ rc = -ENOMEM;
+ goto cleanup_bulk;
}
}
@@ -616,7 +617,8 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
/* ...but the MD attach didn't succeed... */
request->rq_receiving_reply = 0;
spin_unlock(&request->rq_lock);
- GOTO(cleanup_me, rc = -ENOMEM);
+ rc = -ENOMEM;
+ goto cleanup_me;
}
CDEBUG(D_NET, "Setup reply buffer: %u bytes, xid %llu, portal %u\n",
@@ -650,11 +652,11 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
request->rq_request_portal,
request->rq_xid, 0);
if (rc == 0)
- GOTO(out, rc);
+ goto out;
ptlrpc_req_finished(request);
if (noreply)
- GOTO(out, rc);
+ goto out;
cleanup_me:
/* MEUnlink is safe; the PUT didn't even get off the ground, and