Commit ebdd4aea authored by Hannes Eder's avatar Hannes Eder Committed by Linus Torvalds

hugetlb: fix sparse warnings

Fix the following sparse warnings:

  mm/hugetlb.c:375:3: warning: returning void-valued expression
  mm/hugetlb.c:408:3: warning: returning void-valued expression
Signed-off-by: default avatarHannes Eder <hannes@hanneseder.net>
Acked-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f0d7a4b3
...@@ -400,8 +400,10 @@ static void clear_huge_page(struct page *page, ...@@ -400,8 +400,10 @@ static void clear_huge_page(struct page *page,
{ {
int i; int i;
if (unlikely(sz > MAX_ORDER_NR_PAGES)) if (unlikely(sz > MAX_ORDER_NR_PAGES)) {
return clear_gigantic_page(page, addr, sz); clear_gigantic_page(page, addr, sz);
return;
}
might_sleep(); might_sleep();
for (i = 0; i < sz/PAGE_SIZE; i++) { for (i = 0; i < sz/PAGE_SIZE; i++) {
...@@ -433,8 +435,10 @@ static void copy_huge_page(struct page *dst, struct page *src, ...@@ -433,8 +435,10 @@ static void copy_huge_page(struct page *dst, struct page *src,
int i; int i;
struct hstate *h = hstate_vma(vma); struct hstate *h = hstate_vma(vma);
if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES)) if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES)) {
return copy_gigantic_page(dst, src, addr, vma); copy_gigantic_page(dst, src, addr, vma);
return;
}
might_sleep(); might_sleep();
for (i = 0; i < pages_per_huge_page(h); i++) { for (i = 0; i < pages_per_huge_page(h); i++) {
......
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