From patchwork Sat Apr 10 18:18:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCHv2] MTD: Suppress warnings in inline_map_read() Date: Sat, 10 Apr 2010 08:18:58 -0000 From: Kevin Cernekee X-Patchwork-Id: 49907 Message-Id: To: Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org 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 --- 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 b981b87..56a4592 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -386,6 +386,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; }