* [PATCH] mm/thp: simplify has_transparent_hugepage by using IS_BUILTIN
@ 2022-08-29 9:57 Liu Shixin
2022-08-29 9:57 ` David Hildenbrand
0 siblings, 1 reply; 2+ messages in thread
From: Liu Shixin @ 2022-08-29 9:57 UTC (permalink / raw)
To: Andrew Morton, Hugh Dickins, Kefeng Wang
Cc: linux-kernel, linux-mm, Liu Shixin
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/thp: simplify has_transparent_hugepage by using IS_BUILTIN
2022-08-29 9:57 [PATCH] mm/thp: simplify has_transparent_hugepage by using IS_BUILTIN Liu Shixin
@ 2022-08-29 9:57 ` David Hildenbrand
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2022-08-29 9:57 UTC (permalink / raw)
To: Liu Shixin, Andrew Morton, Hugh Dickins, Kefeng Wang
Cc: linux-kernel, linux-mm
On 29.08.22 11:57, Liu Shixin wrote:
> 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
>
> /*
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-29 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29 9:57 [PATCH] mm/thp: simplify has_transparent_hugepage by using IS_BUILTIN Liu Shixin
2022-08-29 9:57 ` David Hildenbrand
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).