Commit 021c7335 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paul Mackerras

[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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 42650d8c
...@@ -620,7 +620,6 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, ...@@ -620,7 +620,6 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
{ {
int lastshift; int lastshift;
u16 areamask, curareas; u16 areamask, curareas;
struct vm_area_struct *vma;
if (HPAGE_SHIFT == 0) if (HPAGE_SHIFT == 0)
return -EINVAL; return -EINVAL;
......
...@@ -107,6 +107,7 @@ static int im_region_status(unsigned long v_addr, unsigned long size, ...@@ -107,6 +107,7 @@ static int im_region_status(unsigned long v_addr, unsigned long size,
if (v_addr < (unsigned long) tmp->addr + tmp->size) if (v_addr < (unsigned long) tmp->addr + tmp->size)
break; break;
*vm = NULL;
if (tmp) { if (tmp) {
if (im_region_overlaps(v_addr, size, tmp)) if (im_region_overlaps(v_addr, size, tmp))
return IM_REGION_OVERLAP; return IM_REGION_OVERLAP;
...@@ -127,7 +128,6 @@ static int im_region_status(unsigned long v_addr, unsigned long size, ...@@ -127,7 +128,6 @@ static int im_region_status(unsigned long v_addr, unsigned long size,
} }
} }
*vm = NULL;
return IM_REGION_UNUSED; return IM_REGION_UNUSED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment