Skip to content

Commit

Permalink
[JFFS2] fix printk warning in jffs2_block_check_erase()
Browse files Browse the repository at this point in the history
fs/jffs2/erase.c: In function 'jffs2_block_check_erase':
fs/jffs2/erase.c:355: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'

and

fs/jffs2/erase.c: In function 'jffs2_erase_pending_blocks':
fs/jffs2/erase.c:404: warning: 'bad_offset' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Andrew Morton authored and David Woodhouse committed Aug 22, 2007
1 parent 9ed437c commit f4e3564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/jffs2/erase.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
} while(--retlen);
c->mtd->unpoint(c->mtd, ebuf, jeb->offset, c->sector_size);
if (retlen)
printk(KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08x\n",
printk(KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08tx\n",
*wordebuf, jeb->offset + c->sector_size-retlen*sizeof(*wordebuf));
return 0;
}
Expand Down Expand Up @@ -401,7 +401,7 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
{
size_t retlen;
int ret;
uint32_t bad_offset;
uint32_t uninitialized_var(bad_offset);

switch (jffs2_block_check_erase(c, jeb, &bad_offset)) {
case -EAGAIN: goto refile;
Expand Down

0 comments on commit f4e3564

Please sign in to comment.