Commit 55df5fad authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

staging: lustre: obdclass: expand the GOTO macro + break

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl,rc,f;
constant c;
@@

- GOTO(lbl,\(rc\|rc->f\|c\));
- break;
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
- break;
+ rc;
+ goto lbl;
// </smpl>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09c8a87c
...@@ -1226,25 +1226,25 @@ int class_process_config(struct lustre_cfg *lcfg) ...@@ -1226,25 +1226,25 @@ int class_process_config(struct lustre_cfg *lcfg)
} }
case LCFG_POOL_NEW: { case LCFG_POOL_NEW: {
err = obd_pool_new(obd, lustre_cfg_string(lcfg, 2)); err = obd_pool_new(obd, lustre_cfg_string(lcfg, 2));
GOTO(out, err = 0); err = 0;
break; goto out;
} }
case LCFG_POOL_ADD: { case LCFG_POOL_ADD: {
err = obd_pool_add(obd, lustre_cfg_string(lcfg, 2), err = obd_pool_add(obd, lustre_cfg_string(lcfg, 2),
lustre_cfg_string(lcfg, 3)); lustre_cfg_string(lcfg, 3));
GOTO(out, err = 0); err = 0;
break; goto out;
} }
case LCFG_POOL_REM: { case LCFG_POOL_REM: {
err = obd_pool_rem(obd, lustre_cfg_string(lcfg, 2), err = obd_pool_rem(obd, lustre_cfg_string(lcfg, 2),
lustre_cfg_string(lcfg, 3)); lustre_cfg_string(lcfg, 3));
GOTO(out, err = 0); err = 0;
break; goto out;
} }
case LCFG_POOL_DEL: { case LCFG_POOL_DEL: {
err = obd_pool_del(obd, lustre_cfg_string(lcfg, 2)); err = obd_pool_del(obd, lustre_cfg_string(lcfg, 2));
GOTO(out, err = 0); err = 0;
break; goto out;
} }
default: { default: {
err = obd_process_config(obd, sizeof(*lcfg), lcfg); err = obd_process_config(obd, sizeof(*lcfg), lcfg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment