Staging: dgnc: Merge lines and remove unused variable for immediate return
authorVaishali Thakkar <vthakkar1994@gmail.com>
Fri, 19 Sep 2014 05:00:59 +0000 (10:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Sep 2014 00:25:22 +0000 (17:25 -0700)
commit3dfe7557809e5867306c7a0614b9d1c6036cbe4d
treef2d8b8a4fc5e5ec843843ebe307993f0b373eda1
parent10352c2a69f4aa2724f007a4922518c9ece7bf89
Staging: dgnc: Merge lines and remove unused variable for immediate return

This patch merges two lines in a single line if immediate
return is found. It also removes unnecessory variable rc
as it is no longer needed.

This is done using Coccinelle. Semantic patch used for this
is as follows:

@@
type T;
identifier i;
identifier f;
constant C;
@@
- T i;
  ...when != i
     when strict
(
  return -C;
|
- i =
+ return
     f(...);
- return i;
)

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_tty.c