mtd: suppress warnings in inline_map_read()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu May 13 21:59:04 EDT 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9ea5973883bbe26372f45d99eb3a500f08d966f9
Commit:     9ea5973883bbe26372f45d99eb3a500f08d966f9
Parent:     709c4efb68cccd2de9a7d63b1f90276b1617e613
Author:     Kevin Cernekee <cernekee at gmail.com>
AuthorDate: Sat Apr 10 11:18:58 2010 -0700
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri May 14 01:52:55 2010 +0100

    mtd: suppress warnings in inline_map_read()
    
    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 at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 include/linux/mtd/map.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
index 01703d4..de89eca 100644
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -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;
 }



More information about the linux-mtd-cvs mailing list