All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vatika Harlalka <vatikaharlalka@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] Staging: lustre: Remove unneeded variable and replace its uses
Date: Tue, 10 Mar 2015 19:12:42 +0530	[thread overview]
Message-ID: <20150310134242.GA9593@akanksha> (raw)

Variable dotdot is only used as a function parameter and
can be replaced there directly to improve code compactness.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_nfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index 6a67e71..b8ced3d 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -287,7 +287,6 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
 	struct ll_sb_info     *sbi;
 	struct dentry	 *result = NULL;
 	struct mdt_body       *body;
-	static const char	   dotdot[] = "..";
 	struct md_op_data     *op_data;
 	int		   rc;
 	int		      lmmsize;
@@ -303,8 +302,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
 	if (rc != 0)
 		return ERR_PTR(rc);
 
-	op_data = ll_prep_md_op_data(NULL, dir, NULL, dotdot,
-				     strlen(dotdot), lmmsize,
+	op_data = ll_prep_md_op_data(NULL, dir, NULL, "..",
+				     2, lmmsize,
 				     LUSTRE_OPC_ANY, NULL);
 	if (IS_ERR(op_data))
 		return (void *)op_data;
@@ -321,7 +320,7 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
 	CDEBUG(D_INFO, "parent for "DFID" is "DFID"\n",
 		PFID(ll_inode2fid(dir)), PFID(&body->fid1));
 
-	result = ll_iget_for_nfs(dir->i_sb, &body->fid1, NULL);
+	
 
 	ptlrpc_req_finished(req);
 	return result;
-- 
1.9.1



             reply	other threads:[~2015-03-10 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 13:42 Vatika Harlalka [this message]
2015-03-10 13:47 ` [Outreachy kernel] [PATCH] Staging: lustre: Remove unneeded variable and replace its uses Julia Lawall
2015-03-10 14:00   ` Vatika Harlalka
2015-03-15 10:20 ` Greg KH
2015-03-15 10:26   ` Vatika Harlalka

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=20150310134242.GA9593@akanksha \
    --to=vatikaharlalka@gmail.com \
    --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.