lkml.org 
[lkml]   [2022]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/thp: simplify has_transparent_hugepage by using IS_BUILTIN
Date
Simplify code of has_transparent_hugepage define by using IS_BUILTIN.

No functional change.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
include/linux/pgtable.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 73fb1b2af795..a108b60a6962 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -1610,11 +1610,7 @@ typedef unsigned int pgtbl_mod_mask;
#endif

#ifndef has_transparent_hugepage
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
-#define has_transparent_hugepage() 1
-#else
-#define has_transparent_hugepage() 0
-#endif
+#define has_transparent_hugepage() IS_BUILTIN(CONFIG_TRANSPARENT_HUGEPAGE)
#endif

/*
--
2.25.1
\
 
 \ /
  Last update: 2022-08-29 11:23    [W:0.061 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site