From: ran xiaokai <ranxiaokai627@163.com>
To: akpm@linux-foundation.org, willy@infradead.org
Cc: vbabka@suse.cz, svetly.todorov@memverge.com,
ran.xiaokai@zte.com.cn, baohua@kernel.org, ryan.roberts@arm.com,
peterx@redhat.com, ziy@nvidia.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/2] mm: Constify folio_order()/folio_test_pmd_mappable()
Date: Wed, 26 Jun 2024 02:49:23 +0000 [thread overview]
Message-ID: <20240626024924.1155558-2-ranxiaokai627@163.com> (raw)
In-Reply-To: <20240626024924.1155558-1-ranxiaokai627@163.com>
From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Constify folio_order()/folio_test_pmd_mappable().
No functional changes, just a preparation for the next patch.
Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
---
include/linux/huge_mm.h | 2 +-
include/linux/mm.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 2aa986a5cd1b..8d66e4eaa1bc 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -377,7 +377,7 @@ static inline spinlock_t *pud_trans_huge_lock(pud_t *pud,
* folio_test_pmd_mappable - Can we map this folio with a PMD?
* @folio: The folio to test
*/
-static inline bool folio_test_pmd_mappable(struct folio *folio)
+static inline bool folio_test_pmd_mappable(const struct folio *folio)
{
return folio_order(folio) >= HPAGE_PMD_ORDER;
}
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 9a5652c5fadd..b1c11371a2a3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1105,7 +1105,7 @@ static inline unsigned int compound_order(struct page *page)
*
* Return: The order of the folio.
*/
-static inline unsigned int folio_order(struct folio *folio)
+static inline unsigned int folio_order(const struct folio *folio)
{
if (!folio_test_large(folio))
return 0;
--
2.15.2
next prev parent reply other threads:[~2024-06-26 2:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 2:49 [PATCH 0/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages ran xiaokai
2024-06-26 2:49 ` ran xiaokai [this message]
2024-06-26 3:09 ` [PATCH 1/2] mm: Constify folio_order()/folio_test_pmd_mappable() Zi Yan
2024-06-26 4:30 ` ran xiaokai
2024-06-26 11:19 ` Zi Yan
2024-06-26 2:49 ` [PATCH 2/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages ran xiaokai
2024-06-26 3:06 ` Zi Yan
2024-06-26 4:32 ` ran xiaokai
2024-06-26 11:07 ` Ryan Roberts
2024-06-26 14:40 ` Zi Yan
2024-06-26 14:42 ` Ryan Roberts
2024-06-27 1:54 ` Lance Yang
2024-06-27 4:10 ` Barry Song
2024-06-27 8:39 ` Ryan Roberts
2024-06-27 9:16 ` Barry Song
2024-06-27 9:27 ` Ryan Roberts
2024-06-27 12:46 ` ran xiaokai
2024-06-26 15:15 ` Matthew Wilcox
2024-06-26 15:18 ` Ryan Roberts
2024-06-27 2:07 ` Lance Yang
2024-06-26 15:55 ` kernel test robot
2024-06-26 16:21 ` kernel test robot
2024-06-27 13:54 ` David Hildenbrand
2024-06-28 3:01 ` ran xiaokai
2024-07-03 9:20 ` ran xiaokai
2024-07-03 10:11 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240626024924.1155558-2-ranxiaokai627@163.com \
--to=ranxiaokai627@163.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=ran.xiaokai@zte.com.cn \
--cc=ryan.roberts@arm.com \
--cc=svetly.todorov@memverge.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).