From: Andrew Morton Date: Thu, 19 Jul 2007 08:49:08 +0000 (-0700) Subject: dequeue_huge_page() warning fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3abf7afd406866a84276d3ed04f4edf6070c9cb5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dequeue_huge_page() warning fix mm/hugetlb.c: In function `dequeue_huge_page': mm/hugetlb.c:72: warning: 'nid' might be used uninitialized in this function Cc: Christoph Lameter Cc: Adam Litke Cc: David Gibson Cc: William Lee Irwin III Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c4a573b857bd..15fc7b000772 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -78,16 +78,13 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma, for (z = zonelist->zones; *z; z++) { nid = zone_to_nid(*z); if (cpuset_zone_allowed_softwall(*z, htlb_alloc_mask) && - !list_empty(&hugepage_freelists[nid])) - break; - } - - if (*z) { - page = list_entry(hugepage_freelists[nid].next, - struct page, lru); - list_del(&page->lru); - free_huge_pages--; - free_huge_pages_node[nid]--; + !list_empty(&hugepage_freelists[nid])) { + page = list_entry(hugepage_freelists[nid].next, + struct page, lru); + list_del(&page->lru); + free_huge_pages--; + free_huge_pages_node[nid]--; + } } return page; }