diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-02-05 07:28:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 18:44:14 +0100 |
commit | 9e2779fa281cfda13ac060753d674bbcaa23367e (patch) | |
tree | e2af17d69b71e0f8b3f00fe949cb8abfba4298ed /drivers/net | |
parent | i386: Resolve dependency of asm-i386/pgtable.h on highmem.h (diff) | |
download | linux-9e2779fa281cfda13ac060753d674bbcaa23367e.tar.xz linux-9e2779fa281cfda13ac060753d674bbcaa23367e.zip |
is_vmalloc_addr(): Check if an address is within the vmalloc boundaries
Checking if an address is a vmalloc address is done in a couple of places.
Define a common version in mm.h and replace the other checks.
Again the include structures suck. The definition of VMALLOC_START and
VMALLOC_END is not available in vmalloc.h since highmem.c cannot be included
there.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_offload.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index d48c396bdabb..901c824bfe6d 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c @@ -1070,9 +1070,7 @@ void *cxgb_alloc_mem(unsigned long size) */ void cxgb_free_mem(void *addr) { - unsigned long p = (unsigned long)addr; - - if (p >= VMALLOC_START && p < VMALLOC_END) + if (is_vmalloc_addr(addr)) vfree(addr); else kfree(addr); |