public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] jffs2: fix sparse warning in nodemgmt.c
@ 2008-02-16  3:22 Harvey Harrison
  0 siblings, 0 replies; only message in thread
From: Harvey Harrison @ 2008-02-16  3:22 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Andrew Morton, LKML

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.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 fs/jffs2/nodemgmt.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index a0313fa..96faa70 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -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();
 
-- 
1.5.4.1.1278.gc75be



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-16  3:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16  3:22 [PATCH 2/4] jffs2: fix sparse warning in nodemgmt.c Harvey Harrison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox