From: Andrew Morton <[email-masked]>

- Fix coding style mess

- Rename `map' to `vma' to keep Hugh happy.

Cc: Christoph Lameter <[email-masked]>
Cc: Hugh Dickins <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 fs/proc/task_mmu.c        |   78 +++++++++++++++++++++++-----------------------
 include/linux/mempolicy.h |    3 +
 proc/base.c               |    0 
 mempolicy.c               |    0 
 4 files changed, 42 insertions(+), 39 deletions(-)

diff -puN fs/proc/base.c~proc-pid-numa_maps-to-show-on-which-nodes-pages-reside-tidy fs/proc/base.c
diff -puN fs/proc/task_mmu.c~proc-pid-numa_maps-to-show-on-which-nodes-pages-reside-tidy fs/proc/task_mmu.c
--- devel/fs/proc/task_mmu.c~proc-pid-numa_maps-to-show-on-which-nodes-pages-reside-tidy	2005-07-12 17:17:18.000000000 -0700
+++ devel-akpm/fs/proc/task_mmu.c	2005-07-12 17:17:18.000000000 -0700
@@ -249,7 +249,7 @@ struct numa_maps {
 /*
  * Calculate numa node maps for a vma
  */
-static inline struct numa_maps *get_numa_maps(const struct vm_area_struct *vma)
+static struct numa_maps *get_numa_maps(const struct vm_area_struct *vma)
 {
 	struct page *page;
 	unsigned long vaddr;
@@ -289,70 +289,72 @@ static inline struct numa_maps *get_numa
 static int show_numa_map(struct seq_file *m, void *v)
 {
 	struct task_struct *task = m->private;
-	struct vm_area_struct *map = v;
+	struct vm_area_struct *vma = v;
 	struct mempolicy *pol;
 	struct numa_maps *md;
 	struct zone **z;
 	int n;
 	int first;
 
-	if (!map->vm_mm)
+	if (!vma->vm_mm)
 		return 0;
 
-	md = get_numa_maps(map);
+	md = get_numa_maps(vma);
 	if (!md)
 		return 0;
 
-	seq_printf(m, "%08lx", map->vm_start);
-	pol = get_vma_policy(task, map, map->vm_start);
+	seq_printf(m, "%08lx", vma->vm_start);
+	pol = get_vma_policy(task, vma, vma->vm_start);
 	/* Print policy */
 	switch (pol->policy) {
-		case MPOL_PREFERRED:
-			seq_printf(m, " prefer=%d", pol->v.preferred_node);
-			break;
-		case MPOL_BIND:
-			seq_printf(m, " bind={");
-			first = 1;
-			for(z = pol->v.zonelist->zones; *z; z++) {
-
+	case MPOL_PREFERRED:
+		seq_printf(m, " prefer=%d", pol->v.preferred_node);
+		break;
+	case MPOL_BIND:
+		seq_printf(m, " bind={");
+		first = 1;
+		for (z = pol->v.zonelist->zones; *z; z++) {
+
+			if (!first)
+				seq_putc(m, ',');
+			else
+				first = 0;
+			seq_printf(m, "%d/%s", (*z)->zone_pgdat->node_id,
+					(*z)->name);
+		}
+		seq_putc(m, '}');
+		break;
+	case MPOL_INTERLEAVE:
+		seq_printf(m, " interleave={");
+		first = 1;
+		for_each_node(n) {
+			if (test_bit(n, pol->v.nodes)) {
 				if (!first)
-					seq_putc(m, ',');
+					seq_putc(m,',');
 				else
 					first = 0;
-				seq_printf(m, "%d/%s", (*z)->zone_pgdat->node_id, (*z)->name);
-
+				seq_printf(m, "%d",n);
 			}
-			seq_putc(m, '}');
-			break;
-		case MPOL_INTERLEAVE:
-			seq_printf(m, " interleave={");
-			first = 1;
-			for_each_node(n)
-				if (test_bit(n, pol->v.nodes)) {
-					if (!first)
-						seq_putc(m,',');
-					else
-						first = 0;
-					seq_printf(m, "%d",n);
-				}
-			seq_putc(m, '}');
-			break;
-		default:
-			seq_printf(m," default");
-			break;
+		}
+		seq_putc(m, '}');
+		break;
+	default:
+		seq_printf(m," default");
+		break;
 	}
 	seq_printf(m, " MaxRef=%lu Pages=%lu Mapped=%lu",
 			md->mapcount_max, md->pages, md->mapped);
 	if (md->anon)
 		seq_printf(m," Anon=%lu",md->anon);
 
-	for_each_online_node(n)
+	for_each_online_node(n) {
 		if (md->node[n])
 			seq_printf(m, " N%d=%lu", n, md->node[n]);
+	}
 	seq_putc(m, '\n');
 	kfree(md);
-	if (m->count < m->size)  /* map is copied successfully */
-		m->version = (map != get_gate_vma(task))? map->vm_start: 0;
+	if (m->count < m->size)  /* vma is copied successfully */
+		m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0;
 	return 0;
 }
 
diff -puN include/linux/mempolicy.h~proc-pid-numa_maps-to-show-on-which-nodes-pages-reside-tidy include/linux/mempolicy.h
--- devel/include/linux/mempolicy.h~proc-pid-numa_maps-to-show-on-which-nodes-pages-reside-tidy	2005-07-12 17:17:18.000000000 -0700
+++ devel-akpm/include/linux/mempolicy.h	2005-07-12 17:17:18.000000000 -0700
@@ -150,7 +150,8 @@ void mpol_free_shared_policy(struct shar
 struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp,
 					    unsigned long idx);
 
-struct mempolicy *get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned long addr);
+struct mempolicy *get_vma_policy(struct task_struct *task,
+			struct vm_area_struct *vma, unsigned long addr);
 
 extern void numa_default_policy(void);
 extern void numa_policy_init(void);
diff -puN mm/mempolicy.c~proc-pid-numa_maps-to-show-on-which-nodes-pages-reside-tidy mm/mempolicy.c
_