[PATCH] powerpc: fix two build warnings
Arnd Bergmann
arnd at arndb.de
Sat Dec 17 08:45:27 EST 2005
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 at arndb.de>
Index: powerpc-2.6/arch/powerpc/mm/imalloc.c
===================================================================
--- powerpc-2.6.orig/arch/powerpc/mm/imalloc.c
+++ powerpc-2.6/arch/powerpc/mm/imalloc.c
@@ -107,6 +107,7 @@ static int im_region_status(unsigned lon
if (v_addr < (unsigned long) tmp->addr + tmp->size)
break;
+ *vm = NULL;
if (tmp) {
if (im_region_overlaps(v_addr, size, tmp))
return IM_REGION_OVERLAP;
@@ -127,7 +128,6 @@ static int im_region_status(unsigned lon
}
}
- *vm = NULL;
return IM_REGION_UNUSED;
}
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 7283ff1..7370f9f 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -605,7 +605,6 @@ unsigned long hugetlb_get_unmapped_area(
{
int lastshift;
u16 areamask, curareas;
- struct vm_area_struct *vma;
if (HPAGE_SHIFT == 0)
return -EINVAL;
More information about the Linuxppc64-dev
mailing list