X-GM-THRID: 6252664504577949696 Date: Sun, 21 Feb 2016 06:54:31 -0800 (PST) From: Janani Ravichandran To: outreachy-kernel Cc: janani.rvchndrn@gmail.com Message-Id: In-Reply-To: <20160220224501.GA21624@kroah.com> References: <20160218211055.GA6343@janani-Inspiron-3521> <20160220224501.GA21624@kroah.com> Subject: Re: [Outreachy kernel] [PATCH] staging: iio: adc: Remove else after return in if statements MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1540_1707967719.1456066471150" X-Google-Token: EKefp7YFdLXHdl4hXJA0 X-Google-IP: 72.231.208.13 ------=_Part_1540_1707967719.1456066471150 Content-Type: multipart/alternative; boundary="----=_Part_1541_340063907.1456066471151" ------=_Part_1541_340063907.1456066471151 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Saturday, 20 February 2016 17:45:03 UTC-5, gregkh wrote: > > On Thu, Feb 18, 2016 at 04:10:55PM -0500, Janani Ravichandran wrote: > > This patch fixes the checkpatch warning that else is not generally > > useful after a break or return. > > Coccinelle patch used: > > > > @rule1@ > > expression e1; > > @@ > > if(e1) { ... return ...; } > > - else{ > > ... > > - } > > > > @rule2@ > > expression e2; > > statement S1; > > @@ > > > > if(e2) { ... return ...; } > > - else > > S1 > > > > Signed-off-by: Janani Ravichandran > > > --- > > drivers/staging/iio/adc/ad7816.c | 12 ++++++++---- > > drivers/staging/iio/adc/spear_adc.c | 5 ++--- > > 2 files changed, 10 insertions(+), 7 deletions(-) > > This patch conflicts with a patch someone else sent in 2 days prior for > one of these files. Can you please refresh your tree and rebase it and > resend? > Sure, will send a v2. Thanks! Janani. > > thanks, > > greg k-h > ------=_Part_1541_340063907.1456066471151 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Saturday, 20 February 2016 17:45:03 UTC-5, greg= kh wrote:
On Thu, Feb 18, 2016= at 04:10:55PM -0500, Janani Ravichandran wrote:
> This patch fixes the checkpatch warning that else is not generally
> useful after a break or return.
> Coccinelle patch used:
>=20
> @rule1@
> expression e1;
> @@
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if(e1) { ... retur= n ...; }
> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0else{
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0...
> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
>=20
> @rule2@
> expression e2;
> statement S1;
> @@
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if(e2) { ... retur= n ...; }
> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0else
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0S1
>=20
> Signed-off-by: Janani Ravichandran <janani....@gmail.com>
> ---
> =C2=A0drivers/staging/iio/adc/ad7816.c =C2=A0 =C2=A0| 12 ++++= ++++----
> =C2=A0drivers/staging/iio/adc/spear_adc.c | =C2=A05 ++---
> =C2=A02 files changed, 10 insertions(+), 7 deletions(-)

This patch conflicts with a patch someone else sent in 2 days prior for
one of these files. Can you please refresh your tree and rebase it and
resend?
Sure, will send a v2.

Thanks= !
Janani.=C2=A0

thanks,

greg k-h
------=_Part_1541_340063907.1456066471151-- ------=_Part_1540_1707967719.1456066471150--