X-GM-THRID: 4475579269120 X-Google-Groups: outreachy-kernel X-Google-Thread: 9ca63f596c,9816ab370498a2c8 X-Google-Attributes: gid9ca63f596c,domainid0,private,googlegroup X-Google-NewGroupId: yes X-Received: by 10.180.182.201 with SMTP id eg9mr581177wic.3.1425052488203; Fri, 27 Feb 2015 07:54:48 -0800 (PST) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 10.152.20.98 with SMTP id m2ls190642lae.5.gmail; Fri, 27 Feb 2015 07:54:47 -0800 (PST) X-Received: by 10.112.146.65 with SMTP id ta1mr2173834lbb.19.1425052487774; Fri, 27 Feb 2015 07:54:47 -0800 (PST) Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr. [192.134.164.104]) by gmr-mx.google.com with ESMTPS id i7si143188wif.0.2015.02.27.07.54.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Feb 2015 07:54:47 -0800 (PST) Received-SPF: neutral (google.com: 192.134.164.104 is neither permitted nor denied by domain of julia.lawall@lip6.fr) client-ip=192.134.164.104; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.134.164.104 is neither permitted nor denied by domain of julia.lawall@lip6.fr) smtp.mail=julia.lawall@lip6.fr X-IronPort-AV: E=Sophos;i="5.09,660,1418079600"; d="scan'208";a="101563550" Received: from ip209.messe-nbg.customer.bisping.net (HELO hadrien.local) ([62.91.19.209]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Feb 2015 16:54:47 +0100 Date: Fri, 27 Feb 2015 16:54:36 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Aya Mahfouz cc: outreachy-kernel@googlegroups.com Subject: Re: [Outreachy kernel] [PATCH 18/24] staging: lustre: llite: remove unused variable In-Reply-To: <0ae8fe1e6a7e12be20f2d16ad8d0a966564d8654.1425035012.git.mahfouz.saif.elyazal@gmail.com> Message-ID: References: <0ae8fe1e6a7e12be20f2d16ad8d0a966564d8654.1425035012.git.mahfouz.saif.elyazal@gmail.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 > --- > 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. 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. >