[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251121194859.265259-1-gourry@gourry.net>
Date: Fri, 21 Nov 2025 14:48:58 -0500
From: Gregory Price <gourry@...rry.net>
To: linux-mm@...ck.org
Cc: kernel-team@...a.com,
muchun.song@...ux.dev,
osalvador@...e.de,
david@...hat.com,
linux-kernel@...r.kernel.org
Subject: [RESEND PATCH 1/2] hugetlb.h: flatten logic in arch_hugetlb_migration_supported
Simplify if-true-return-true-else-false logic.
Signed-off-by: Gregory Price <gourry@...rry.net>
Acked-by: David Hildenbrand <david@...hat.com>
---
include/linux/hugetlb.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index eb21619206af..d5282d52493b 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -876,12 +876,9 @@ static inline void folio_clear_hugetlb_hwpoison(struct folio *folio)
#ifndef arch_hugetlb_migration_supported
static inline bool arch_hugetlb_migration_supported(struct hstate *h)
{
- if ((huge_page_shift(h) == PMD_SHIFT) ||
+ return ((huge_page_shift(h) == PMD_SHIFT) ||
(huge_page_shift(h) == PUD_SHIFT) ||
- (huge_page_shift(h) == PGDIR_SHIFT))
- return true;
- else
- return false;
+ (huge_page_shift(h) == PGDIR_SHIFT));
}
#endif
#else
--
2.51.1
Powered by blists - more mailing lists