Skip to contentSkip to conversation

mm/hugetlb: fix get_hwpoison_hugetlb_folio() stub

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 19, 2023

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

PATCH 1/1 mm/hugetlb: fix get_hwpoison_hugetlb_folio() stub

From: Arnd Bergmann <[email protected]>

The folio conversion patch only changed one of the two implementations, the empty stub one still needs the corresponding change:

mm/memory-failure.c: In function '__get_hwpoison_page':
mm/memory-failure.c:1335:15: error: implicit declaration of function 'get_hwpoison_hugetlb_folio'; did you mean 'get_hwpoison_huge_page'? [-Werror=implicit-function-declaration]

 1335 |         ret = get_hwpoison_hugetlb_folio(folio, &hugetlb, false);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |               get_hwpoison_huge_page
Fixes 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios")
---
 include/linux/hugetlb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/hugetlb.h +1 -1
index f14a6bd2a6ed..06eb59711e4a 100644
@@ -417,7 +417,7 @@ static inline int isolate_hugetlb(struct folio *folio, struct list_head *list)
 	return -EBUSY;
 }
 
-static inline int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison)
+static inline int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb, bool unpoison)
 {
 	return 0;
 }
Signature · 1 line
2.39.0
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The folio conversion patch only changed one of the two implementations, the empty stub one still needs the corresponding change:

mm/memory-failure.c: In function '__get_hwpoison_page':
mm/memory-failure.c:1335:15: error: implicit declaration of function 'get_hwpoison_hugetlb_folio'; did you mean 'get_hwpoison_huge_page'? [-Werror=implicit-function-declaration]

Quoted 7 lines
  1335 |         ret = get_hwpoison_hugetlb_folio(folio, &hugetlb, false);
       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
       |               get_hwpoison_huge_page
Fixes 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios")

---

Hello,

I also posted a v3 of this patch with the build fix here: https://lore.kernel.org/linux-mm/[email protected]/T/#u

I'm fine with either picking up this patch as a fix or picking up v3.

Thanks,
Sidhartha Kumar

Quoted 16 lines
  include/linux/hugetlb.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/hugetlb.h +1 -1
index f14a6bd2a6ed..06eb59711e4a 100644
@@ -417,7 +417,7 @@ static inline int isolate_hugetlb(struct folio *folio, struct list_head *list)
  	return -EBUSY;
  }
 
-static inline int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison)
+static inline int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb, bool unpoison)
  {
  	return 0;
  }