* [PATCH] hugetlb: fix sparse warnings
@ 2008-11-24 20:05 Hannes Eder
2008-11-24 20:14 ` Nishanth Aravamudan
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Eder @ 2008-11-24 20:05 UTC (permalink / raw)
To: linux-mm, linux-kernel, kernel-janitors
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: Hannes Eder <hannes@hanneseder.net>
---
mm/hugetlb.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 6058b53..56e1406 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -371,8 +371,10 @@ static void clear_huge_page(struct page *page,
{
int i;
- if (unlikely(sz > MAX_ORDER_NR_PAGES))
- return clear_gigantic_page(page, addr, sz);
+ if (unlikely(sz > MAX_ORDER_NR_PAGES)) {
+ clear_gigantic_page(page, addr, sz);
+ return;
+ }
might_sleep();
for (i = 0; i < sz/PAGE_SIZE; i++) {
@@ -404,8 +406,10 @@ static void copy_huge_page(struct page *dst,
struct page *src,
int i;
struct hstate *h = hstate_vma(vma);
- if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES))
- return copy_gigantic_page(dst, src, addr, vma);
+ if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES)) {
+ copy_gigantic_page(dst, src, addr, vma);
+ return;
+ }
might_sleep();
for (i = 0; i < pages_per_huge_page(h); i++) {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hugetlb: fix sparse warnings
2008-11-24 20:05 [PATCH] hugetlb: fix sparse warnings Hannes Eder
@ 2008-11-24 20:14 ` Nishanth Aravamudan
0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Aravamudan @ 2008-11-24 20:14 UTC (permalink / raw)
To: Hannes Eder; +Cc: linux-mm, linux-kernel, kernel-janitors
On 24.11.2008 [21:05:31 +0100], Hannes Eder wrote:
> Impact: 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: Hannes Eder <hannes@hanneseder.net>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Thanks,
Nish
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-24 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-24 20:05 [PATCH] hugetlb: fix sparse warnings Hannes Eder
2008-11-24 20:14 ` Nishanth Aravamudan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox