diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-09-01 22:21:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-02 10:32:03 -0700 |
commit | d1c0d446da8e0255a0edb348325cac293e9eff4c (patch) | |
tree | 2ab7bca2fc0767ed8e304be3be6d2ee7f82a98d9 /drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | |
parent | 995c8b4a555baf29de86ce6b68967d03791ae2b2 (diff) | |
download | op-kernel-dev-d1c0d446da8e0255a0edb348325cac293e9eff4c.zip op-kernel-dev-d1c0d446da8e0255a0edb348325cac293e9eff4c.tar.gz |
staging: lustre: ldlm: 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/ldlm/ldlm_pool.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index a0d3925..6054eee 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -735,7 +735,8 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl) if (parent_ns_proc == NULL) { CERROR("%s: proc entry is not initialized\n", ldlm_ns_name(ns)); - GOTO(out_free_name, rc = -EINVAL); + rc = -EINVAL; + goto out_free_name; } pl->pl_proc_dir = lprocfs_register("pool", parent_ns_proc, NULL, NULL); @@ -743,7 +744,7 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl) CERROR("LProcFS failed in ldlm-pool-init\n"); rc = PTR_ERR(pl->pl_proc_dir); pl->pl_proc_dir = NULL; - GOTO(out_free_name, rc); + goto out_free_name; } var_name[MAX_STRING_SIZE] = '\0'; @@ -767,8 +768,10 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl) pl->pl_stats = lprocfs_alloc_stats(LDLM_POOL_LAST_STAT - LDLM_POOL_FIRST_STAT, 0); - if (!pl->pl_stats) - GOTO(out_free_name, rc = -ENOMEM); + if (!pl->pl_stats) { + rc = -ENOMEM; + goto out_free_name; + } lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANTED_STAT, LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV, |