[PATCH v1 1/3] mm: simplify arch_make_folio_accessible()

From: David Hildenbrand
Date: Mon Jul 29 2024 - 14:39:56 EST


Now that s390x implements HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE, let's turn
generic arch_make_folio_accessible() into a NOP: there are no other
targets that implement HAVE_ARCH_MAKE_PAGE_ACCESSIBLE but not
HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE.

Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
---
include/linux/mm.h | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 381750f41767a..bab689ec77f94 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2215,16 +2215,7 @@ static inline int arch_make_page_accessible(struct page *page)
#ifndef HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE
static inline int arch_make_folio_accessible(struct folio *folio)
{
- int ret;
- long i, nr = folio_nr_pages(folio);
-
- for (i = 0; i < nr; i++) {
- ret = arch_make_page_accessible(folio_page(folio, i));
- if (ret)
- break;
- }
-
- return ret;
+ return 0;
}
#endif

--
2.45.2