[PATCH] mm/swapops: remove unused is_hwpoison_entry()

Sang-Heon Jeon posted 1 patch 6 days, 6 hours ago
include/linux/swapops.h | 9 ---------
1 file changed, 9 deletions(-)
[PATCH] mm/swapops: remove unused is_hwpoison_entry()
Posted by Sang-Heon Jeon 6 days, 6 hours ago
Since commit 93976a20345b ("mm: eliminate further swapops predicates"),
is_hwpoison_entry() has no callers.

So remove it.

No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
 include/linux/swapops.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index e7d0d529f3e0..603f9e3f909c 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -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
Re: [PATCH] mm/swapops: remove unused is_hwpoison_entry()
Posted by Chris Li 4 days ago
On Fri, Sep 18, 2026 at 6:56 AM Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> Since commit 93976a20345b ("mm: eliminate further swapops predicates"),
> is_hwpoison_entry() has no callers.
>
> So remove it.
>
> No functional change.
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>

Acked-by: Chris Li <chrisl@kernel.org>

Chris

> ---
>  include/linux/swapops.h | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/include/linux/swapops.h b/include/linux/swapops.h
> index e7d0d529f3e0..603f9e3f909c 100644
> --- a/include/linux/swapops.h
> +++ b/include/linux/swapops.h
> @@ -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
>
Re: [PATCH] mm/swapops: remove unused is_hwpoison_entry()
Posted by Zenghui Yu 4 days, 15 hours ago
On 9/19/26 12:56 AM, Sang-Heon Jeon wrote:
> Since commit 93976a20345b ("mm: eliminate further swapops predicates"),
> is_hwpoison_entry() has no callers.
> 
> So remove it.
> 
> No functional change.
> 
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
>  include/linux/swapops.h | 9 ---------
>  1 file changed, 9 deletions(-)

Reviewed-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev>

Thanks,
Zenghui
Re: [PATCH] mm/swapops: remove unused is_hwpoison_entry()
Posted by Barry Song 5 days, 16 hours ago
On Sat, Sep 19, 2026 at 12:56 AM Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> Since commit 93976a20345b ("mm: eliminate further swapops predicates"),
> is_hwpoison_entry() has no callers.
>
> So remove it.
>
> No functional change.
>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---

LGTM,

Reviewed-by: Barry Song <baohua@kernel.org>
Re: [PATCH] mm/swapops: remove unused is_hwpoison_entry()
Posted by SJ Park 5 days, 22 hours ago
On Sat, 19 Sep 2026 01:56:40 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:

> Since commit 93976a20345b ("mm: eliminate further swapops predicates"),
> is_hwpoison_entry() has no callers.
> 
> So remove it.
> 
> No functional change.

Looks correct cleanup to me.

> 
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>

Reviewed-by: SJ Park <sj@kernel.org>


Thanks,
SJ

[...]