Skip to content

Commit

Permalink
fix warning in io_mapping_map_wc()
Browse files Browse the repository at this point in the history
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Pallipadi, Venkatesh authored and Ingo Molnar committed Mar 2, 2009
1 parent 92b9af9 commit 5ce04e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/io-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5ce04e3

Please sign in to comment.