All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: "David S. Miller" <davem@davemloft.net>
Cc: kernel-janitors@vger.kernel.org,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/9] ipv6: drop unneeded goto
Date: Thu, 28 May 2015 23:02:17 +0200	[thread overview]
Message-ID: <1432846944-7122-3-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 remove the unnecessary ret variable.

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

---
 net/ipv6/raw.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 484a5c1..ca4700c 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1327,13 +1327,7 @@ static struct inet_protosw rawv6_protosw = {
 
 int __init rawv6_init(void)
 {
-	int ret;
-
-	ret = inet6_register_protosw(&rawv6_protosw);
-	if (ret)
-		goto out;
-out:
-	return ret;
+	return inet6_register_protosw(&rawv6_protosw);
 }
 
 void rawv6_exit(void)


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: "David S. Miller" <davem@davemloft.net>
Cc: kernel-janitors@vger.kernel.org,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/9] ipv6: drop unneeded goto
Date: Thu, 28 May 2015 21:02:17 +0000	[thread overview]
Message-ID: <1432846944-7122-3-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 remove the unnecessary ret variable.

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

---
 net/ipv6/raw.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 484a5c1..ca4700c 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1327,13 +1327,7 @@ static struct inet_protosw rawv6_protosw = {
 
 int __init rawv6_init(void)
 {
-	int ret;
-
-	ret = inet6_register_protosw(&rawv6_protosw);
-	if (ret)
-		goto out;
-out:
-	return ret;
+	return inet6_register_protosw(&rawv6_protosw);
 }
 
 void rawv6_exit(void)


  parent reply	other threads:[~2015-05-28 21:12 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 ` Julia Lawall [this message]
2015-05-28 21:02   ` [PATCH 2/9] ipv6: " Julia Lawall
2015-05-31  6:49   ` David Miller
2015-05-31  6:49     ` David Miller
2015-05-28 21:02 ` [PATCH 3/9] NFS: " Julia Lawall
2015-05-28 21:02   ` 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-3-git-send-email-Julia.Lawall@lip6.fr \
    --to=julia.lawall@lip6.fr \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /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.