Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1416429
| From | Anchal Jain <anchalj109@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement |
| Date | 2016-06-07 19:10 +0200 |
| Message-ID | <rHsFP-5sl-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v2] staging: lustre: lustre: obdclass: Modify return statement Anchal Jain <anchalj109@gmail.com> - 2016-06-07 19:10 +0200 Re: [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement Greg KH <gregkh@linuxfoundation.org> - 2016-06-07 19:40 +0200
csiph-web