From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754444AbcFGREP (ORCPT ); Tue, 7 Jun 2016 13:04:15 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:36669 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbcFGREO (ORCPT ); Tue, 7 Jun 2016 13:04:14 -0400 Date: Tue, 7 Jun 2016 22:34:01 +0530 From: Anchal Jain To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2] staging: lustre: lustre: obdclass: Modify return statement Message-ID: <20160607170349.GA4344@life-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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