All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: kernel-janitors@vger.kernel.org,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/9] NFS: drop unneeded goto
Date: Thu, 28 May 2015 23:02:18 +0200	[thread overview]
Message-ID: <1432846944-7122-4-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1432846944-7122-1-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>

Delete jump to a label on the next line, when that label is not
used elsewhere.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier l;
@@

-if (...) goto l;
-l:
// </smpl>

Also drop the unnecessary ret variable.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 fs/nfs/nfs4idmap.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c
index 2e1737c..535dfc6 100644
--- a/fs/nfs/nfs4idmap.c
+++ b/fs/nfs/nfs4idmap.c
@@ -494,12 +494,7 @@ nfs_idmap_delete(struct nfs_client *clp)
 
 int nfs_idmap_init(void)
 {
-	int ret;
-	ret = nfs_idmap_init_keyring();
-	if (ret != 0)
-		goto out;
-out:
-	return ret;
+	return nfs_idmap_init_keyring();
 }
 
 void nfs_idmap_quit(void)


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: kernel-janitors@vger.kernel.org,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/9] NFS: drop unneeded goto
Date: Thu, 28 May 2015 21:02:18 +0000	[thread overview]
Message-ID: <1432846944-7122-4-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1432846944-7122-1-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>

Delete jump to a label on the next line, when that label is not
used elsewhere.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier l;
@@

-if (...) goto l;
-l:
// </smpl>

Also drop the unnecessary ret variable.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 fs/nfs/nfs4idmap.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c
index 2e1737c..535dfc6 100644
--- a/fs/nfs/nfs4idmap.c
+++ b/fs/nfs/nfs4idmap.c
@@ -494,12 +494,7 @@ nfs_idmap_delete(struct nfs_client *clp)
 
 int nfs_idmap_init(void)
 {
-	int ret;
-	ret = nfs_idmap_init_keyring();
-	if (ret != 0)
-		goto out;
-out:
-	return ret;
+	return nfs_idmap_init_keyring();
 }
 
 void nfs_idmap_quit(void)


  parent reply	other threads:[~2015-05-28 21:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 21:02 [PATCH 0/9] drop unneeded goto Julia Lawall
2015-05-28 21:02 ` Julia Lawall
2015-05-28 21:02 ` Julia Lawall
2015-05-28 21:02 ` Julia Lawall
2015-05-28 21:02 ` [PATCH 1/9] drivers/media/usb/airspy/airspy.c: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-28 21:32   ` Joe Perches
2015-05-28 21:32     ` Joe Perches
2015-05-28 21:02 ` [PATCH 2/9] ipv6: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-31  6:49   ` David Miller
2015-05-31  6:49     ` David Miller
2015-05-28 21:02 ` Julia Lawall [this message]
2015-05-28 21:02   ` [PATCH 3/9] NFS: " Julia Lawall
2015-05-28 21:02 ` [PATCH 4/9] RDMA/ocrdma: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-28 21:02 ` [PATCH 5/9] wl1251: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-06-08  8:39   ` [5/9] " Kalle Valo
2015-06-08  8:39     ` Kalle Valo
2015-05-28 21:02 ` [PATCH 6/9] ssb: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-28 21:02 ` [PATCH 7/9] drivers/media/tuners/e4000.c: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-28 21:02 ` [PATCH 8/9] staging/lustre/mdc: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-28 21:02 ` [PATCH 9/9] regmap: " Julia Lawall
2015-05-28 21:02   ` Julia Lawall
2015-05-29  9:37   ` Mark Brown
2015-05-29  9:37     ` Mark Brown

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=1432846944-7122-4-git-send-email-Julia.Lawall@lip6.fr \
    --to=julia.lawall@lip6.fr \
    --cc=anna.schumaker@netapp.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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: link
Be 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.