* [PATCH] mm: page_alloc: remove unneeded header files
@ 2023-05-27 10:07 Miaohe Lin
2023-05-30 22:13 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2023-05-27 10:07 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, linmiaohe
Remove some unneeded header files. No functional change intended.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/page_alloc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e671c747892f..beb6db613238 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -24,9 +24,7 @@
#include <linux/kernel.h>
#include <linux/kasan.h>
#include <linux/kmsan.h>
-#include <linux/module.h>
#include <linux/suspend.h>
-#include <linux/pagevec.h>
#include <linux/ratelimit.h>
#include <linux/oom.h>
#include <linux/topology.h>
@@ -36,8 +34,6 @@
#include <linux/memory_hotplug.h>
#include <linux/nodemask.h>
#include <linux/vmstat.h>
-#include <linux/sort.h>
-#include <linux/pfn.h>
#include <linux/fault-inject.h>
#include <linux/compaction.h>
#include <trace/events/kmem.h>
@@ -52,11 +48,9 @@
#include <linux/memcontrol.h>
#include <linux/ftrace.h>
#include <linux/lockdep.h>
-#include <linux/nmi.h>
#include <linux/psi.h>
#include <linux/khugepaged.h>
#include <linux/delayacct.h>
-#include <asm/div64.h>
#include "internal.h"
#include "shuffle.h"
#include "page_reporting.h"
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: page_alloc: remove unneeded header files
2023-05-27 10:07 [PATCH] mm: page_alloc: remove unneeded header files Miaohe Lin
@ 2023-05-30 22:13 ` Andrew Morton
2023-06-03 3:27 ` Miaohe Lin
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2023-05-30 22:13 UTC (permalink / raw)
To: Miaohe Lin; +Cc: linux-mm, linux-kernel
On Sat, 27 May 2023 18:07:28 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
> Remove some unneeded header files. No functional change intended.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> mm/page_alloc.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index e671c747892f..beb6db613238 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -24,9 +24,7 @@
> #include <linux/kernel.h>
> #include <linux/kasan.h>
> #include <linux/kmsan.h>
> -#include <linux/module.h>
This contains the prototype for print_modules(). So we're now reliant
upon module.h being included via some other header, which is fragile.
> #include <linux/suspend.h>
> -#include <linux/pagevec.h>
> #include <linux/ratelimit.h>
> #include <linux/oom.h>
> #include <linux/topology.h>
> @@ -36,8 +34,6 @@
> #include <linux/memory_hotplug.h>
> #include <linux/nodemask.h>
> #include <linux/vmstat.h>
> -#include <linux/sort.h>
> -#include <linux/pfn.h>
> #include <linux/fault-inject.h>
> #include <linux/compaction.h>
> #include <trace/events/kmem.h>
> @@ -52,11 +48,9 @@
> #include <linux/memcontrol.h>
> #include <linux/ftrace.h>
> #include <linux/lockdep.h>
> -#include <linux/nmi.h>
> #include <linux/psi.h>
> #include <linux/khugepaged.h>
> #include <linux/delayacct.h>
> -#include <asm/div64.h>
Needed for do_div()?
> #include "internal.h"
> #include "shuffle.h"
> #include "page_reporting.h"
> --
> 2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: page_alloc: remove unneeded header files
2023-05-30 22:13 ` Andrew Morton
@ 2023-06-03 3:27 ` Miaohe Lin
0 siblings, 0 replies; 3+ messages in thread
From: Miaohe Lin @ 2023-06-03 3:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm, linux-kernel
On 2023/5/31 6:13, Andrew Morton wrote:
> On Sat, 27 May 2023 18:07:28 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
>
>> Remove some unneeded header files. No functional change intended.
>>
>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>> ---
>> mm/page_alloc.c | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index e671c747892f..beb6db613238 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -24,9 +24,7 @@
>> #include <linux/kernel.h>
>> #include <linux/kasan.h>
>> #include <linux/kmsan.h>
>> -#include <linux/module.h>
>
> This contains the prototype for print_modules(). So we're now reliant
> upon module.h being included via some other header, which is fragile.
Will keep it.
>
>> #include <linux/suspend.h>
>> -#include <linux/pagevec.h>
>> #include <linux/ratelimit.h>
>> #include <linux/oom.h>
>> #include <linux/topology.h>
>> @@ -36,8 +34,6 @@
>> #include <linux/memory_hotplug.h>
>> #include <linux/nodemask.h>
>> #include <linux/vmstat.h>
>> -#include <linux/sort.h>
>> -#include <linux/pfn.h>
>> #include <linux/fault-inject.h>
>> #include <linux/compaction.h>
>> #include <trace/events/kmem.h>
>> @@ -52,11 +48,9 @@
>> #include <linux/memcontrol.h>
>> #include <linux/ftrace.h>
>> #include <linux/lockdep.h>
>> -#include <linux/nmi.h>
>> #include <linux/psi.h>
>> #include <linux/khugepaged.h>
>> #include <linux/delayacct.h>
>> -#include <asm/div64.h>
>
> Needed for do_div()?
Will add it back. Depending on "asm/div64.h" being included via some other headers is fragile too.
Many thanks for your comment.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-03 3:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-27 10:07 [PATCH] mm: page_alloc: remove unneeded header files Miaohe Lin
2023-05-30 22:13 ` Andrew Morton
2023-06-03 3:27 ` Miaohe Lin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.