linux-next: build warning after merge of the akpm-current tree
Subsystems (3)
Hi all,
After merging the akpm-current tree, today's linux-next build (i386 defconfig) produced this warning:
mm/hugetlb.c: In function 'dequeue_huge_page_vma':mm/hugetlb.c:1180:1: warning: label 'check_reserve' defined but not used [-Wunused-label]
1180 | check_reserve:
| ^~~~~~~~~~~~~
Introduced by commit
df178183cf05 ("mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY")
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Stephen,
Quoted 5 lines · Stephen Rothwell
Hi all,
After merging the akpm-current tree, today's linux-next build (i386 defconfig) produced this warning:
Quoted 8 lines
mm/hugetlb.c: In function 'dequeue_huge_page_vma':mm/hugetlb.c:1180:1: warning: label 'check_reserve' defined but not used [-Wunused-label]
1180 |check_reserve:| ^~~~~~~~~~~~~Introduced by commit
df178183cf05("mm/hugetlb: add support for mempolicyMPOL_PREFERRED_MANY")
Thanks for the report!
The below patch should fix it (Also attached).
Andrew,
Could you help to fold it to the 4/6 of patchset of "introducing multi-preference memplicy":
[PATCH v6 4/6] mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY
Thanks!
- Feng
--------------------------------8<-----------------------------------
From 4d3b4b0037bf4e1eacae4886387ffe4af90f5a1f Mon Sep 17 00:00:00 2001
From: Feng Tang <[email protected]>
Date: Mon, 19 Jul 2021 16:24:23 +0800
Subject: [PATCH] mm/hugetlb: fix compile warning for !CONFIG_NUMA build
Stephen Rothwell reported the i386 build with CONFIG_NUMA=n will have a warning:
mm/hugetlb.c: In function 'dequeue_huge_page_vma':mm/hugetlb.c:1180:1: warning: label 'check_reserve' defined but not used [-Wunused-label]
1180 | check_reserve:
| ^~~~~~~~~~~~~
introduced by commit
df178183cf05 ("mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY")
--- mm/hugetlb.c | 2 ++ 1 file changed, 2 insertions(+)
mm/hugetlb.c +2 -0
@@ -1177,7 +1177,9 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,#endif page =dequeue_huge_page_nodemask (h, gfp_mask, nid, nodemask); +#ifdef CONFIG_NUMA check_reserve: +#endif if (page && !avoid_reserve &&vma_has_reserves (vma, chg)) {SetHPageRestoreReserve (page); h->resv_huge_pages--;
Signature · 1 line
2.7.4
Quoted 3 lines
Signature · 2 lines
Cheers, Stephen Rothwell
From 4d3b4b0037bf4e1eacae4886387ffe4af90f5a1f Mon Sep 17 00:00:00 2001
From: Feng Tang <[email protected]>
Date: Mon, 19 Jul 2021 16:24:23 +0800
Subject: [PATCH] mm/hugetlb: fix compile warning for !CONFIG_NUMA build
Stephen Rothwell reported the i386 build with CONFIG_NUMA=n will have a warning:
mm/hugetlb.c: In function 'dequeue_huge_page_vma':mm/hugetlb.c:1180:1: warning: label 'check_reserve' defined but not used [-Wunused-label]
1180 | check_reserve:
| ^~~~~~~~~~~~~
introduced by commit
df178183cf05 ("mm/hugetlb: add support for mempolicy MPOL_PREFERRED_MANY")
--- mm/hugetlb.c | 2 ++ 1 file changed, 2 insertions(+)
mm/hugetlb.c +2 -0
@@ -1177,7 +1177,9 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,#endif page =dequeue_huge_page_nodemask (h, gfp_mask, nid, nodemask); +#ifdef CONFIG_NUMA check_reserve: +#endif if (page && !avoid_reserve &&vma_has_reserves (vma, chg)) {SetHPageRestoreReserve (page); h->resv_huge_pages--;
Signature · 1 line
2.7.4