From: Joe Perches <joe@perches.com>
To: Shraddha Barke <shraddha.6596@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging:dgap :Compression of lines for immediate return
Date: Sun, 26 Jul 2015 12:39:24 -0700 [thread overview]
Message-ID: <1437939564.2669.96.camel@perches.com> (raw)
In-Reply-To: <20150726173413.GA30485@shraddha-370R4E-370R4V-370R5E-3570RE-370R5V>
On Sun, 2015-07-26 at 23:04 +0530, Shraddha Barke wrote:
> This patch compresses two lines into a single line if immediate return statement
> is found. Also,remove variable rc as it is no longer needed.
> It is done using tool Coccinelle. And semantic patch used for this is as follows:
>
> @@
> expression ret;
> identifier f;
> @@
> -ret =
> +return
> f(...);
> -return ret;
This isn't an always safe or side-effect free
semantic patch as there may be a cast lost by
such a conversion.
int foo(void)
{
char i = 0xffffffff;
return i;
}
where i is now int not char
next prev parent reply other threads:[~2015-07-26 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-26 17:34 [PATCH] Staging:dgap :Compression of lines for immediate return Shraddha Barke
2015-07-26 19:39 ` Joe Perches [this message]
2015-07-27 4:30 ` Sudip Mukherjee
-- strict thread matches above, loose matches on Subject: below --
2015-07-27 17:37 Shraddha Barke
2015-07-27 18:00 Shraddha Barke
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=1437939564.2669.96.camel@perches.com \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shraddha.6596@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox