Skip to contentSkip to conversation

mm/swapops: remove unused is_hwpoison_entry()

PATCH Applied Sang-Heon Jeon 5 participants 5 messages Sep 18 – Sep 20

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

PATCH 1/1 mm/swapops: remove unused is_hwpoison_entry()

Since commit 93976a20345b ("mm: eliminate further swapops predicates"), is_hwpoison_entry() has no callers.

So remove it.

No functional change.

---
 include/linux/swapops.h | 9 ---------
 1 file changed, 9 deletions(-)
include/linux/swapops.h +0 -9
index e7d0d529f3e0..603f9e3f909c 100644
@@ -261,11 +261,6 @@ static inline swp_entry_t make_hwpoison_entry(struct page *page)
 	return swp_entry(SWP_HWPOISON, page_to_pfn(page));
 }
 
-static inline int is_hwpoison_entry(swp_entry_t entry)
-{
-	return swp_type(entry) == SWP_HWPOISON;
-}
-
 #else
 
 static inline swp_entry_t make_hwpoison_entry(struct page *page)
@@ -273,10 +268,6 @@ static inline swp_entry_t make_hwpoison_entry(struct page *page)
 	return swp_entry(0, 0);
 }
 
-static inline int is_hwpoison_entry(swp_entry_t swp)
-{
-	return 0;
-}
 #endif
 
 typedef unsigned long pte_marker;
Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#4 lore raw
In reply to Sang-Heon Jeon
Quoted 9 lines · Sang-Heon Jeon

Since commit 93976a20345b ("mm: eliminate further swapops predicates"), is_hwpoison_entry() has no callers.

So remove it.

No functional change.

Chris

Quoted 34 lines
---
 include/linux/swapops.h | 9 ---------
 1 file changed, 9 deletions(-)
include/linux/swapops.h +0 -10
index e7d0d529f3e0..603f9e3f909c 100644
@@ -261,11 +261,6 @@ static inline swp_entry_t make_hwpoison_entry(struct page *page)
        return swp_entry(SWP_HWPOISON, page_to_pfn(page));
 }
 
-static inline int is_hwpoison_entry(swp_entry_t entry)
-{
-       return swp_type(entry) == SWP_HWPOISON;
-}
-
 #else
 
 static inline swp_entry_t make_hwpoison_entry(struct page *page)
@@ -273,10 +268,6 @@ static inline swp_entry_t make_hwpoison_entry(struct page *page)
        return swp_entry(0, 0);
 }
 
-static inline int is_hwpoison_entry(swp_entry_t swp)
-{
-       return 0;
-}
 #endif
 
 typedef unsigned long pte_marker;
--

2.43.0