Skip to contentSkip to conversation

Make map_vm_area() static

PATCH In review Benjamin Herrenschmidt 2 participants 3 messages May 16, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Make map_vm_area() static

map_vm_area() is only ever used inside of mm/vmalloc.c. This makes it static and removes the prototype.

---

 include/linux/vmalloc.h |    2 --
 mm/vmalloc.c            |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)
include/linux/vmalloc.h +0 -2
Index: linux-cell/include/linux/vmalloc.h
===================================================================
@@ -66,8 +66,6 @@ extern struct vm_struct *get_vm_area_nod
 					  gfp_t gfp_mask);
 extern struct vm_struct *remove_vm_area(void *addr);
 
-extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
-			struct page ***pages);
 extern void unmap_kernel_range(unsigned long addr, unsigned long size);
 
 /*
mm/vmalloc.c +2 -1
Index: linux-cell/mm/vmalloc.c
===================================================================
@@ -140,7 +140,8 @@ static inline int vmap_pud_range(pgd_t *
 	return 0;
 }
 
-int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
+static int map_vm_area(struct vm_struct *area, pgprot_t prot,
+		       struct page ***pages)
 {
 	pgd_t *pgd;
 	unsigned long next;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Benjamin Herrenschmidt

map_vm_area() is only ever used inside of mm/vmalloc.c. This makes it static and removes the prototype.

Looks good.

Thanks. However, patch 1/2 is the interesting one for which I'd like to get your comment since you asked me to do it this way :-)

(I know, I incorrectly labelled it powerpc: while it's generic code)

Cheers,
Ben.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>