Skip to contentSkip to conversation

linux-next: build failure after merge of the mm tree

PATCH Stephen Rothwell 2 participants 4 messages May 11, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig) failed like this:

In file included from include/linux/hugetlb.h:757,
from arch/sparc/mm/hugetlbpage.c:11:
arch/sparc/include/asm/hugetlb.h: In function 'huge_ptep_clear_flush':
arch/sparc/include/asm/hugetlb.h:27:1: error: no return statement in function returning non-void [-Werror=return-type]
27 | }

      | ^

(and many more)

Caused by commit

083af99303b9 ("mm: change huge_ptep_clear_flush() to return the original pte")

I applied the following hack to make it build.

From: Stephen Rothwell <[email protected]>
Date: Wed, 11 May 2022 18:10:56 +1000
Subject: [PATCH] fix up for "mm: change huge_ptep_clear_flush() to return the original pte"

---
 arch/sparc/include/asm/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)
arch/sparc/include/asm/hugetlb.h +1 -0
index b50aa6f8f9ab..0a26cca24232 100644
@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
 static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
 					  unsigned long addr, pte_t *ptep)
 {
+	return *ptep;
 }
 
 #define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
Reviewed-by
#1 lore raw

Hi Stephen,

Quoted 18 lines · Stephen Rothwell

Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig) failed like this:

In file included from include/linux/hugetlb.h:757,
from arch/sparc/mm/hugetlbpage.c:11:
arch/sparc/include/asm/hugetlb.h: In function 'huge_ptep_clear_flush':
arch/sparc/include/asm/hugetlb.h:27:1: error: no return statement in function returning non-void [-Werror=return-type]

    27 | }
       | ^

(and many more)

Caused by commit

083af99303b9 ("mm: change huge_ptep_clear_flush() to return the original pte")

Quoted 7 lines

I applied the following hack to make it build.

From: Stephen Rothwell <[email protected]>
Date: Wed, 11 May 2022 18:10:56 +1000
Subject: [PATCH] fix up for "mm: change huge_ptep_clear_flush() to return the original pte"

Sorry for my mistake. LGTM.

Quoted 16 lines
---
  arch/sparc/include/asm/hugetlb.h | 1 +
  1 file changed, 1 insertion(+)
arch/sparc/include/asm/hugetlb.h +1 -0
index b50aa6f8f9ab..0a26cca24232 100644
@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
  static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
  					  unsigned long addr, pte_t *ptep)
  {
+	return *ptep;
  }
 
  #define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
#2 lore raw
In reply to Stephen Rothwell
Quoted 18 lines · Stephen Rothwell

Hi all,

After merging the mm tree, today's linux-next build (sparc64 defconfig) failed like this:

In file included from include/linux/hugetlb.h:757,
from arch/sparc/mm/hugetlbpage.c:11:
arch/sparc/include/asm/hugetlb.h: In function 'huge_ptep_clear_flush':
arch/sparc/include/asm/hugetlb.h:27:1: error: no return statement in function returning non-void [-Werror=return-type]

    27 | }
       | ^

(and many more)

Caused by commit

083af99303b9 ("mm: change huge_ptep_clear_flush() to return the original pte")

Quoted 7 lines

I applied the following hack to make it build.

From: Stephen Rothwell <[email protected]>
Date: Wed, 11 May 2022 18:10:56 +1000
Subject: [PATCH] fix up for "mm: change huge_ptep_clear_flush() to return the original pte"

Sorry again. I think I also missed other ARCHs' changes. Need include below fixes.

arch/ia64/include/asm/hugetlb.h +1 -0
index 65d3811..026ead4 100644
@@ -26,6 +26,7 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
 static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
                                          unsigned long addr, pte_t *ptep)
 {
+       return *ptep;
 }
 
 #include <asm-generic/hugetlb.h>
arch/parisc/include/asm/hugetlb.h +1 -0
index 25bc560..f7f078c 100644
@@ -31,6 +31,7 @@ static inline int prepare_hugepage_range(struct file *file,
 static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
                                          unsigned long addr, pte_t *ptep)
 {
+       return *ptep;
 }
 
 #define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
arch/sh/include/asm/hugetlb.h +1 -0
index e727cc9..4d3ba39 100644
@@ -24,6 +24,7 @@ static inline int prepare_hugepage_range(struct file *file,
 static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
                                          unsigned long addr, pte_t *ptep)
 {
+       return *ptep;
 }
 
 static inline void arch_clear_hugepage_flags(struct page *page)
arch/sparc/include/asm/hugetlb.h +1 -0
index b50aa6f..0a26cca 100644
@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
 static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
                                          unsigned long addr, pte_t *ptep)
 {
+       return *ptep;
 }
 
 #define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
Quoted 16 lines
---
  arch/sparc/include/asm/hugetlb.h | 1 +
  1 file changed, 1 insertion(+)
arch/sparc/include/asm/hugetlb.h +1 -0
index b50aa6f8f9ab..0a26cca24232 100644
@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
  static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
  					  unsigned long addr, pte_t *ptep)
  {
+	return *ptep;
  }
 
  #define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
#3 lore raw

Hi Baolin,

Quoted 2 lines · On Wed, 11 May 2022 16:42:17 +0800 Baolin Wang <[email protected]>…

Sorry again. I think I also missed other ARCHs' changes. Need include below fixes.

I will add that to my fix up patch today (unless Andrew does a new release).

Thanks.

Signature · 2 lines
Cheers,
Stephen Rothwell