linux-next: build warning after merge of the akpm-current tree

2 messages, 2 authors, 2021-07-19 · open the first message on its own page

linux-next: build warning after merge of the akpm-current tree

From: Stephen Rothwell <hidden>
Date: 2021-07-19 07:52:11

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")

-- 
Cheers,
Stephen Rothwell

Re: linux-next: build warning after merge of the akpm-current tree

From: Feng Tang <hidden>
Date: 2021-07-19 09:05:12

Hi Stephen,

On Mon, Jul 19, 2021 at 05:52:03PM +1000, Stephen Rothwell wrote:
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")
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 <redacted>
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")

Signed-off-by: Feng Tang <redacted>
---
 mm/hugetlb.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ae1a39e11bcf..528947da65c8 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -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--;
-- 
2.7.4


> -- 
> Cheers,
> Stephen Rothwell

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help