From: Julia Lawall <Julia.Lawall@lip6.fr> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: kernel-janitors@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, "Dilger, Andreas" <andreas.dilger@intel.com>, "Drokin, Oleg" <oleg.drokin@intel.com>, Peng Tao <bergwolf@gmail.com> Subject: [PATCH 6/7] staging: lustre: obdclass: expand the GOTO macro + break Date: Sun, 7 Sep 2014 18:18:34 +0200 [thread overview] Message-ID: <1410106715-9573-6-git-send-email-Julia.Lawall@lip6.fr> (raw) From: Julia Lawall <Julia.Lawall@lip6.fr> 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: Julia Lawall <Julia.Lawall@lip6.fr> --- drivers/staging/lustre/lustre/obdclass/obd_config.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index f41695d..8a9752f 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -1226,25 +1226,25 @@ int class_process_config(struct lustre_cfg *lcfg) } case LCFG_POOL_NEW: { err = obd_pool_new(obd, lustre_cfg_string(lcfg, 2)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } case LCFG_POOL_ADD: { err = obd_pool_add(obd, lustre_cfg_string(lcfg, 2), lustre_cfg_string(lcfg, 3)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } case LCFG_POOL_REM: { err = obd_pool_rem(obd, lustre_cfg_string(lcfg, 2), lustre_cfg_string(lcfg, 3)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } case LCFG_POOL_DEL: { err = obd_pool_del(obd, lustre_cfg_string(lcfg, 2)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } default: { err = obd_process_config(obd, sizeof(*lcfg), lcfg);
WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: kernel-janitors@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, "Dilger, Andreas" <andreas.dilger@intel.com>, "Drokin, Oleg" <oleg.drokin@intel.com>, Peng Tao <bergwolf@gmail.com> Subject: [PATCH 6/7] staging: lustre: obdclass: expand the GOTO macro + break Date: Sun, 07 Sep 2014 16:18:34 +0000 [thread overview] Message-ID: <1410106715-9573-6-git-send-email-Julia.Lawall@lip6.fr> (raw) From: Julia Lawall <Julia.Lawall@lip6.fr> 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: Julia Lawall <Julia.Lawall@lip6.fr> --- drivers/staging/lustre/lustre/obdclass/obd_config.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index f41695d..8a9752f 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -1226,25 +1226,25 @@ int class_process_config(struct lustre_cfg *lcfg) } case LCFG_POOL_NEW: { err = obd_pool_new(obd, lustre_cfg_string(lcfg, 2)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } case LCFG_POOL_ADD: { err = obd_pool_add(obd, lustre_cfg_string(lcfg, 2), lustre_cfg_string(lcfg, 3)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } case LCFG_POOL_REM: { err = obd_pool_rem(obd, lustre_cfg_string(lcfg, 2), lustre_cfg_string(lcfg, 3)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } case LCFG_POOL_DEL: { err = obd_pool_del(obd, lustre_cfg_string(lcfg, 2)); - GOTO(out, err = 0); - break; + err = 0; + goto out; } default: { err = obd_process_config(obd, sizeof(*lcfg), lcfg);
next reply other threads:[~2014-09-07 16:22 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-07 16:18 Julia Lawall [this message] 2014-09-07 16:18 ` [PATCH 6/7] staging: lustre: obdclass: expand the GOTO macro + break Julia Lawall 2014-09-09 12:54 ` Dan Carpenter 2014-09-09 12:54 ` Dan Carpenter 2014-09-09 13:05 ` Julia Lawall 2014-09-09 13:05 ` Julia Lawall 2014-09-09 13:37 ` Drokin, Oleg 2014-09-09 13:37 ` Drokin, Oleg 2014-09-09 20:38 ` [PATCH] checkpatch: Warn on macros with flow control statements Joe Perches 2014-09-09 20:38 ` Joe Perches 2014-09-10 8:43 ` Dan Carpenter 2014-09-10 8:43 ` Dan Carpenter 2014-09-10 13:55 ` Joe Perches 2014-09-10 13:55 ` Joe Perches 2014-09-10 14:06 ` Julia Lawall 2014-09-10 14:06 ` Julia Lawall 2014-09-10 14:36 ` Joe Perches 2014-09-10 14:36 ` Joe Perches 2014-09-10 14:52 ` Drokin, Oleg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1410106715-9573-6-git-send-email-Julia.Lawall@lip6.fr \ --to=julia.lawall@lip6.fr \ --cc=andreas.dilger@intel.com \ --cc=bergwolf@gmail.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=oleg.drokin@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.