From: Pallipadi, Venkatesh Date: Sun, 1 Mar 2009 16:53:27 +0000 (-0800) Subject: fix warning in io_mapping_map_wc() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ce04e3de8c36ba37c56e94e3c4dc7973c7f546c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git fix warning in io_mapping_map_wc() Signed-off-by: Venkatesh Pallipadi Signed-off-by: Ingo Molnar --- diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index cbc2f0cd631b..0adb0f91568c 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -91,8 +91,11 @@ io_mapping_unmap_atomic(void *vaddr) static inline void * io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) { + resource_size_t phys_addr; + BUG_ON(offset >= mapping->size); - resource_size_t phys_addr = mapping->base + offset; + phys_addr = mapping->base + offset; + return ioremap_wc(phys_addr, PAGE_SIZE); }