linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement
@ 2016-06-07 17:04 Anchal Jain
  2016-06-07 17:30 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Anchal Jain @ 2016-06-07 17:04 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Modify the return statement.
The Coccinelle semantic patch used to make this change is as follows:

@@
expression e, ret;
@@

-ret =
+return
        e;
-return ret;

Delete the declaration of the return variable rc, as it is no longer used.


Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
changes in v2
	--add public cc with patch
 drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c
index c27d4ec..55f625f 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c
@@ -127,7 +127,6 @@ out:
 int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle)
 {
 	struct llog_handle	*loghandle, *n;
-	int			 rc;
 
 	list_for_each_entry_safe(loghandle, n, &cathandle->u.chd.chd_head,
 				 u.phd.phd_entry) {
@@ -138,8 +137,7 @@ int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle)
 	/* if handle was stored in ctxt, remove it too */
 	if (cathandle->lgh_ctxt->loc_handle == cathandle)
 		cathandle->lgh_ctxt->loc_handle = NULL;
-	rc = llog_close(env, cathandle);
-	return rc;
+	return llog_close(env, cathandle);
 }
 EXPORT_SYMBOL(llog_cat_close);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement
  2016-06-07 17:04 [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement Anchal Jain
@ 2016-06-07 17:30 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-06-07 17:30 UTC (permalink / raw)
  To: Anchal Jain; +Cc: linux-kernel

On Tue, Jun 07, 2016 at 10:34:01PM +0530, Anchal Jain wrote:
> Modify the return statement.
> The Coccinelle semantic patch used to make this change is as follows:
> 
> @@
> expression e, ret;
> @@
> 
> -ret =
> +return
>         e;
> -return ret;
> 
> Delete the declaration of the return variable rc, as it is no longer used.
> 
> 
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>
> ---
> changes in v2
> 	--add public cc with patch

Please use scripts/get_maintainer.pl to determine who and what lists
to send patches to (hint, lkml is almost never the correct list to
_only_ send patches to.)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-07 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 17:04 [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement Anchal Jain
2016-06-07 17:30 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).