netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Shruti@Freescale.com
Cc: f.fainelli@gmail.com, netdev@vger.kernel.org, emmedve1@Freescale.com
Subject: Re: [PATCH] net/phy: Remove return value for a void function
Date: Tue, 01 Apr 2014 11:04:05 -0700	[thread overview]
Message-ID: <1396375445.21529.95.camel@joe-AO722> (raw)
In-Reply-To: <1396363464-28923-1-git-send-email-Shruti@Freescale.com>

Here's a spatch script for this:

$ cat void_return.cocci
@@
identifier func;
expression S;
@@
void func(...) {
...
	if (...)
-		return S;
+		{ S; return; }
...
}

@@
identifier func;
expression S;
@@
void func(...) {
...
	if (...) {
...
-		return S;
+		S;
	}
...
}

@@
identifier func;
expression S;
@@
void func(...) {
...
-	return S;
+	S;
}

  parent reply	other threads:[~2014-04-01 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 14:44 [PATCH] net/phy: Remove return value for a void function Shruti
2014-04-01 17:47 ` Florian Fainelli
2014-04-01 18:04 ` Joe Perches [this message]
2014-04-01 19:53   ` Shruti Kanetkar
2014-04-01 19:59     ` Florian Fainelli
2014-04-01 20:03       ` Shruti Kanetkar
  -- strict thread matches above, loose matches on Subject: below --
2014-04-01 14:22 Shruti
2014-04-01 14:33 ` Emil Medve
2014-04-01 17:26   ` Sergei Shtylyov

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=1396375445.21529.95.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=Shruti@Freescale.com \
    --cc=emmedve1@Freescale.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).