Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1192543 > unrolled thread

Re: [PATCH] Staging:dgap :Compression of lines for immediate return

Started byJoe Perches <joe@perches.com>
First post2015-07-26 21:40 +0200
Last post2015-07-26 21:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] Staging:dgap :Compression of lines for immediate return Joe Perches <joe@perches.com> - 2015-07-26 21:40 +0200

#1192543 — Re: [PATCH] Staging:dgap :Compression of lines for immediate return

FromJoe Perches <joe@perches.com>
Date2015-07-26 21:40 +0200
SubjectRe: [PATCH] Staging:dgap :Compression of lines for immediate return
Message-ID<pQzWa-45b-3@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web