All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 14/24] staging: lustre: lov: remove unused variable
Date: Fri, 27 Feb 2015 21:13:18 +0200	[thread overview]
Message-ID: <20150227191318.GD31834@waves> (raw)
In-Reply-To: <alpine.DEB.2.10.1502271656040.2663@hadrien>

On Fri, Feb 27, 2015 at 04:56:19PM +0100, Julia Lawall wrote:
> 
> 
> On Fri, 27 Feb 2015, Aya Mahfouz wrote:
> 
> > This patch removes a variable that was simply used to
> > store the return value of a function call before
> > returning it.
> >
> > The issue was detected and resolved using the following
> > coccinelle script:
> >
> > @@
> > identifier len,f;
> > @@
> >
> > -int len;
> >  ... when != len
> >      when strict
> > -len =
> > +return
> >         f(...);
> > -return len;																																		Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> > ---
> >  drivers/staging/lustre/lustre/lov/lov_obd.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
> > index 2c6c558..9960b45 100644
> > --- a/drivers/staging/lustre/lustre/lov/lov_obd.c
> > +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
> > @@ -314,7 +314,7 @@ static int lov_disconnect(struct obd_export *exp)
> >  {
> >  	struct obd_device *obd = class_exp2obd(exp);
> >  	struct lov_obd *lov = &obd->u.lov;
> > -	int i, rc;
> > +	int i;
> >
> >  	if (!lov->lov_tgts)
> >  		goto out;
> > @@ -340,8 +340,7 @@ static int lov_disconnect(struct obd_export *exp)
> >  	obd_putref(obd);
> >
> >  out:
> > -	rc = class_disconnect(exp); /* bz 9811 */
> > -	return rc;
> > +	return class_disconnect(exp);
> 
> The comment should probably be preserved.
> 
> julia
> 
Yes, you're totally right. I've managed it in another patch. Seems that
I wasn't diligent enough.
> >  }
> >
> >  /* Error codes:
> > --
> > 1.9.3
> >
> >
> > --
> > Kind Regards,
> > Aya Saif El-yazal Mahfouz
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8f04ef8c0696cbc93f0ec76b4860354d50fd0b88.1425035010.git.mahfouz.saif.elyazal%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >

-- 
Kind Regards,
Aya Saif El-yazal Mahfouz


  reply	other threads:[~2015-02-27 19:13 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 12:48 [PATCH 00/24] remove unused variables Aya Mahfouz
2015-02-27 12:49 ` [PATCH 01/24] staging: wlan-ng: remove unused variable Aya Mahfouz
2015-02-27 12:50 ` [PATCH 02/24] " Aya Mahfouz
2015-02-27 12:51 ` [PATCH 03/24] staging: vt6655: " Aya Mahfouz
2015-02-27 12:53 ` [PATCH 04/24] staging: rtl8188eu: os_dep: " Aya Mahfouz
2015-02-27 15:59   ` [Outreachy kernel] " Julia Lawall
2015-02-27 12:54 ` [PATCH 05/24] " Aya Mahfouz
2015-02-27 12:55 ` [PATCH 06/24] staging: lustre: ptlrpc: " Aya Mahfouz
2015-02-27 12:55 ` [PATCH 07/24] staging: lustre: osc: " Aya Mahfouz
2015-02-27 12:56 ` [PATCH 08/24] staging: lustre: obdecho: " Aya Mahfouz
2015-02-27 12:57 ` [PATCH 09/24] staging: lustre: obdclass: " Aya Mahfouz
2015-02-27 12:57 ` [PATCH 10/24] " Aya Mahfouz
2015-02-27 12:59 ` [PATCH 11/24] staging: lustre: mgc: " Aya Mahfouz
2015-02-27 13:01 ` [PATCH 12/24] staging: lustre: mdc: " Aya Mahfouz
2015-02-27 13:02 ` [PATCH 13/24] " Aya Mahfouz
2015-02-27 15:56   ` [Outreachy kernel] " Julia Lawall
2015-02-27 13:02 ` [PATCH 14/24] staging: lustre: lov: " Aya Mahfouz
2015-02-27 15:56   ` [Outreachy kernel] " Julia Lawall
2015-02-27 19:13     ` Aya Mahfouz [this message]
2015-02-27 13:03 ` [PATCH 15/24] staging: lustre: lmv: remove unused variables Aya Mahfouz
2015-03-02  0:27   ` [Outreachy kernel] " Greg KH
2015-02-27 13:06 ` [PATCH 16/24] staging: lustre: llite: remove unused variable Aya Mahfouz
2015-02-27 15:55   ` [Outreachy kernel] " Julia Lawall
2015-02-27 13:06 ` [PATCH 17/24] " Aya Mahfouz
2015-02-27 13:07 ` [PATCH 18/24] " Aya Mahfouz
2015-02-27 15:54   ` [Outreachy kernel] " Julia Lawall
2015-02-27 19:09     ` Aya Mahfouz
2015-02-27 13:07 ` [PATCH 19/24] " Aya Mahfouz
2015-02-27 13:08 ` [PATCH 20/24] staging: iio: meter: " Aya Mahfouz
2015-02-27 13:09 ` [PATCH 21/24] staging: iio: meter: remove unused variables Aya Mahfouz
2015-02-27 15:53   ` [Outreachy kernel] " Julia Lawall
2015-02-27 16:00   ` Daniel Baluta
2015-02-27 19:06     ` Aya Mahfouz
2015-02-27 13:09 ` [PATCH 22/24] staging: iio: light: remove unused variable Aya Mahfouz
2015-02-27 13:10 ` [PATCH 23/24] staging: fbtft: " Aya Mahfouz
2015-02-27 13:11 ` [PATCH 24/24] staging: dgap: " Aya Mahfouz

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=20150227191318.GD31834@waves \
    --to=mahfouz.saif.elyazal@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.