The following commit has been merged into the x86/mm branch of tip:
Commit-ID: e7616bb5ef5fe752e15db8a3dbd8657dc19c21f2
Gitweb: https://git.kernel.org/tip/e7616bb5ef5fe752e15db8a3dbd8657dc19c21f2
Author: Vishal Moola <vishal.moola@gmail.com>
AuthorDate: Mon, 29 Jun 2026 11:57:34 -07:00
Committer: Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Mon, 13 Jul 2026 15:55:09 -07:00
x86/mm/pat: Use IS_ENABLED() instead of ifdef
Use IS_ENABLED() to check if we are on 32 bit. This standardizes this
check with the other 32 bit check in the file. No functional changes.
Signed-off-by: Vishal Moola <vishal.moola@gmail.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: William Kucharski <william.kucharski@linux.dev>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Link: https://patch.msgid.link/20260629185742.126987-2-vishal.moola@gmail.com
---
arch/x86/mm/pat/set_memory.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
index d023a40..3b9032a 100644
--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -888,8 +888,8 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
{
/* change init_mm */
set_pte_atomic(kpte, pte);
-#ifdef CONFIG_X86_32
- {
+
+ if (IS_ENABLED(CONFIG_X86_32)) {
struct page *page;
list_for_each_entry(page, &pgd_list, lru) {
@@ -905,7 +905,6 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
set_pte_atomic((pte_t *)pmd, pte);
}
}
-#endif
}
static pgprot_t pgprot_clear_protnone_bits(pgprot_t prot)