[PATCH 02/17] mtd: do use mtd->point directly

Artem Bityutskiy dedekind1 at gmail.com
Tue Jan 10 08:35:13 EST 2012


On Thu, 2012-01-05 at 15:03 -0800, Brian Norris wrote:
> > +++ b/fs/jffs2/erase.c
> > @@ -336,12 +336,11 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
> >        uint32_t ofs;
> >        size_t retlen;
> >        int ret = -EIO;
> 
> I think this initialization (ret = -EIO) was unnecessary in the first
> place and certainly is unnecessary now. Remove it?

Fair enough. I've pushed this patch to my tree:

From 162ab608ee94e01dc740c6cb55939f45aa184d44 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Date: Tue, 10 Jan 2012 15:32:29 +0200
Subject: [PATCH] jffs2: do not initialize variable unnecessarily

Remove unnecessary initializer for a local variable.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 fs/jffs2/erase.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index a01cdad..eafb8d3 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -335,7 +335,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
 	void *ebuf;
 	uint32_t ofs;
 	size_t retlen;
-	int ret = -EIO;
+	int ret;
 	unsigned long *wordebuf;
 
 	ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
-- 
1.7.7.5

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120110/1dfb00c2/attachment.sig>


More information about the linux-mtd mailing list