Skip to contentSkip to conversation

jffs2: fix sparse warning in nodemgmt.c

PATCH New Harvey Harrison 1 participant 1 message Feb 16, 2008 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 jffs2: fix sparse warning in nodemgmt.c

fs/jffs2/nodemgmt.c:60:8: warning: symbol 'ret' shadows an earlier one fs/jffs2/nodemgmt.c:45:6: originally declared here

Use a different var (gc) in the inner loop to test the condition.

---
 fs/jffs2/nodemgmt.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
fs/jffs2/nodemgmt.c +4 -4
index a0313fa..96faa70 100644
@@ -57,7 +57,7 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
 	/* this needs a little more thought (true <tglx> :)) */
 	while(ret == -EAGAIN) {
 		while(c->nr_free_blocks + c->nr_erasing_blocks < blocksneeded) {
-			int ret;
+			int gc;
 			uint32_t dirty, avail;
 
 			/* calculate real dirty size
@@ -116,9 +116,9 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
 				  c->free_size + c->dirty_size + c->wasted_size + c->used_size + c->erasing_size + c->bad_size, c->flash_size));
 			spin_unlock(&c->erase_completion_lock);
 
-			ret = jffs2_garbage_collect_pass(c);
-			if (ret)
-				return ret;
+			gc = jffs2_garbage_collect_pass(c);
+			if (gc)
+				return gc;
 
 			cond_resched();
 
Signature · 1 line
1.5.4.1.1278.gc75be