mtd: suppress warnings in inline_map_read()
authorKevin Cernekee <cernekee@gmail.com>
Sat, 10 Apr 2010 18:18:58 +0000 (11:18 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 14 May 2010 00:52:55 +0000 (01:52 +0100)
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@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
include/linux/mtd/map.h

index 01703d4259862632bfef5823280026a41ab32a5b..de89eca864ce02dc4317a4f9e52f328785866473 100644 (file)
@@ -387,6 +387,8 @@ static inline map_word inline_map_read(struct map_info *map, unsigned long ofs)
 #endif
        else if (map_bankwidth_is_large(map))
                memcpy_fromio(r.x, map->virt+ofs, map->bankwidth);
+       else
+               BUG();
 
        return r;
 }