linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
	fabf@skynet.be, Luis de Bethencourt <luisbg@osg.samsung.com>
Subject: [PATCH] befs/btree: remove unneeded initializations
Date: Mon, 30 May 2016 01:39:59 +0100	[thread overview]
Message-ID: <1464568799-12631-1-git-send-email-luisbg@osg.samsung.com> (raw)

off in befs_bt_read_node() will be written by befs_read_datastream(), with
the value that node->od_node needs.

node_off in befs_btree_read() isn't read before set to root_node_ptr.

Removing these two unneeded initializations.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
---

Hi,

Also saw these while reading the code.

Thanks :)
Luis

 fs/befs/btree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/befs/btree.c b/fs/befs/btree.c
index 307645f9..3bd8ab6 100644
--- a/fs/befs/btree.c
+++ b/fs/befs/btree.c
@@ -196,7 +196,7 @@ static int
 befs_bt_read_node(struct super_block *sb, const befs_data_stream *ds,
 		  struct befs_btree_node *node, befs_off_t node_off)
 {
-	uint off = 0;
+	uint off;
 
 	befs_debug(sb, "---> %s", __func__);
 
@@ -422,7 +422,7 @@ befs_btree_read(struct super_block *sb, const befs_data_stream *ds,
 {
 	struct befs_btree_node *this_node;
 	befs_btree_super bt_super;
-	befs_off_t node_off = 0;
+	befs_off_t node_off;
 	int cur_key;
 	fs64 *valarray;
 	char *keystart;
-- 
2.5.1

             reply	other threads:[~2016-05-30  0:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30  0:39 Luis de Bethencourt [this message]
2016-06-01 22:42 ` [PATCH] befs/btree: remove unneeded initializations Andrew Morton
2016-06-01 23:43   ` Luis de Bethencourt

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=1464568799-12631-1-git-send-email-luisbg@osg.samsung.com \
    --to=luisbg@osg.samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 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).