2004-06-28 20:07:10

by Nicolas Pitre

[permalink] [raw]
Subject: [PATCH] move prototype for __get_vm_area() to a sane location


There are currently two files besides mm/vmalloc.c that make use of that
function:

- arch/sh/kernel/cpu/sh4/sq.c
which defined its own prototype locally risking not being in sync with
the real function, and

- arch/arm/kernel/module.c which has no prototype at all and cause
build warnings.

This patch fixes those issues.

--- linux-2.6/include/linux/vmalloc.h 27 Jun 2004 17:54:00 -0000 1.11
+++ linux-2.6/include/linux/vmalloc.h 28 Jun 2004 19:48:16 -0000
@@ -36,6 +36,8 @@
* Lowlevel-APIs (not for driver use!)
*/
extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
+extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
+ unsigned long start, unsigned long end);
extern struct vm_struct *remove_vm_area(void *addr);
extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
struct page ***pages);
--- linux-2.6/arch/sh/kernel/cpu/sh4/sq.c 23 Mar 2004 15:25:10 -0000 1.3
+++ linux-2.6/arch/sh/kernel/cpu/sh4/sq.c 28 Jun 2004 19:43:18 -0000
@@ -34,8 +34,6 @@
static LIST_HEAD(sq_mapping_list);
static spinlock_t sq_mapping_lock = SPIN_LOCK_UNLOCKED;

-extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end);
-
/**
* sq_flush - Flush (prefetch) the store queue cache
*