浏览代码

fix warning in io_mapping_map_wc()

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Pallipadi, Venkatesh 16 年之前
父节点
当前提交
5ce04e3de8
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      include/linux/io-mapping.h

+ 4 - 1
include/linux/io-mapping.h

@@ -91,8 +91,11 @@ io_mapping_unmap_atomic(void *vaddr)
 static inline void *
 static inline void *
 io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
 io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
 {
 {
+	resource_size_t phys_addr;
+
 	BUG_ON(offset >= mapping->size);
 	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);
 	return ioremap_wc(phys_addr, PAGE_SIZE);
 }
 }