aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2005-12-16 16:45:27 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 23:14:14 -0500
commit021c73354921a315ae2fceb1ad7807d1569a5a74 (patch)
tree35451e7108516ed2746a75a230381d7ab44abcc9 /arch/powerpc/mm
parent42650d8c9060a2658a79d4e30a5790b23d7753e0 (diff)
[PATCH] powerpc: fix two build warnings
Building the arch/powerpc tree currently gives me two warnings with gcc-4.0: arch/powerpc/mm/imalloc.c: In function '__im_get_area': arch/powerpc/mm/imalloc.c:225: warning: 'tmp' may be used uninitialized in this function arch/powerpc/mm/hugetlbpage.c: In function 'hugetlb_get_unmapped_area': arch/powerpc/mm/hugetlbpage.c:608: warning: unused variable 'vma' both fixes are trivial. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hugetlbpage.c1
-rw-r--r--arch/powerpc/mm/imalloc.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index f6fe3eaf87a3..b51bb28c054b 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -620,7 +620,6 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
620{ 620{
621 int lastshift; 621 int lastshift;
622 u16 areamask, curareas; 622 u16 areamask, curareas;
623 struct vm_area_struct *vma;
624 623
625 if (HPAGE_SHIFT == 0) 624 if (HPAGE_SHIFT == 0)
626 return -EINVAL; 625 return -EINVAL;
diff --git a/arch/powerpc/mm/imalloc.c b/arch/powerpc/mm/imalloc.c
index f9587bcc6a48..8b0c132bc163 100644
--- a/arch/powerpc/mm/imalloc.c
+++ b/arch/powerpc/mm/imalloc.c
@@ -107,6 +107,7 @@ static int im_region_status(unsigned long v_addr, unsigned long size,
107 if (v_addr < (unsigned long) tmp->addr + tmp->size) 107 if (v_addr < (unsigned long) tmp->addr + tmp->size)
108 break; 108 break;
109 109
110 *vm = NULL;
110 if (tmp) { 111 if (tmp) {
111 if (im_region_overlaps(v_addr, size, tmp)) 112 if (im_region_overlaps(v_addr, size, tmp))
112 return IM_REGION_OVERLAP; 113 return IM_REGION_OVERLAP;
@@ -127,7 +128,6 @@ static int im_region_status(unsigned long v_addr, unsigned long size,
127 } 128 }
128 } 129 }
129 130
130 *vm = NULL;
131 return IM_REGION_UNUSED; 131 return IM_REGION_UNUSED;
132} 132}
133 133