Re: [PATCH] MTD: Suppress warnings in inline_map_read()

From: David Woodhouse
Date: Sat Apr 10 2010 - 05:27:32 EST


On Fri, 2010-04-09 at 15:45 -0700, Kevin Cernekee wrote:
> With gcc 4.4.3 -O2 on MIPS32:
>
> drivers/mtd/chips/cfi_util.c: In function 'cfi_qry_present':
> include/linux/mtd/map.h:390: warning: 'r' may be used uninitialized in this function
> include/linux/mtd/map.h:375: note: 'r' was declared here
> include/linux/mtd/map.h:390: warning: 'r' may be used uninitialized in this function
> include/linux/mtd/map.h:375: note: 'r' was declared here
>
> Signed-off-by: Kevin Cernekee <cernekee@xxxxxxxxx>

I suspect 'else BUG()' would be a better fix.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@xxxxxxxxx Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/