lkml.org 
[lkml]   [2011]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/10] valid_phys_addr_range: use phys_addr_t for the @addr parameter
Date
The correct type for physical addresses is phys_addr_t. This is in
fact needed to check 64-bit physical addresses on 32-bit architectures
(such as i386 PAE).

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
drivers/char/mem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 7d86bda..cbbaf36 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -45,7 +45,7 @@ static inline unsigned long size_inside_page(unsigned long start,
}

#ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE
-static inline int valid_phys_addr_range(unsigned long addr, size_t count)
+static inline int valid_phys_addr_range(phys_addr_t addr, size_t count)
{
return addr + count <= __pa(high_memory);
}
--
1.7.3.4

\
 
 \ /
  Last update: 2011-06-17 10:59    [W:0.162 / U:3.244 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site