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 18/24] staging: lustre: llite: remove unused variable
Date: Fri, 27 Feb 2015 21:09:34 +0200 [thread overview]
Message-ID: <20150227190934.GC31834@waves> (raw)
In-Reply-To: <alpine.DEB.2.10.1502271654110.2663@hadrien>
On Fri, Feb 27, 2015 at 04:54:36PM +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/llite/file.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> > index 0fd113d..3ae4d85 100644
> > --- a/drivers/staging/lustre/lustre/llite/file.c
> > +++ b/drivers/staging/lustre/lustre/llite/file.c
> > @@ -888,7 +888,6 @@ static int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
> > {
> > struct ldlm_lock *lock;
> > bool cancelled = true;
> > - int rc;
> >
> > lock = ldlm_handle2lock(&och->och_lease_handle);
> > if (lock != NULL) {
> > @@ -906,9 +905,8 @@ static int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
> > if (lease_broken != NULL)
> > *lease_broken = cancelled;
> >
> > - rc = ll_close_inode_openhandle(ll_i2sbi(inode)->ll_md_exp, inode, och,
> > + return ll_close_inode_openhandle(ll_i2sbi(inode)->ll_md_exp, inode, och,
> > NULL);
>
> The NULL argument was aligned with the first argument before, but now it
> is not.
>
Will fix it. Thank you Julia.
> julia
>
> > - return rc;
> > }
> >
> > /* Fills the obdo with the attributes for the lsm */
> > --
> > 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/0ae8fe1e6a7e12be20f2d16ad8d0a966564d8654.1425035012.git.mahfouz.saif.elyazal%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
--
Kind Regards,
Aya Saif El-yazal Mahfouz
next prev parent reply other threads:[~2015-02-27 19:09 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
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 [this message]
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=20150227190934.GC31834@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.