* [PATCH] arm64: mm: Remove unused header file
@ 2021-01-26 12:24 Shaokun Zhang
2021-01-26 12:39 ` Will Deacon
2021-01-26 23:39 ` Will Deacon
0 siblings, 2 replies; 4+ messages in thread
From: Shaokun Zhang @ 2021-01-26 12:24 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Shaokun Zhang, Catalin Marinas, Will Deacon
Many header files are never used, let's remove them directly.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
arch/arm64/mm/mmap.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c
index 07937b49cb88..c66b3878712c 100644
--- a/arch/arm64/mm/mmap.c
+++ b/arch/arm64/mm/mmap.c
@@ -5,20 +5,10 @@
* Copyright (C) 2012 ARM Ltd.
*/
-#include <linux/elf.h>
-#include <linux/fs.h>
#include <linux/memblock.h>
-#include <linux/mm.h>
-#include <linux/mman.h>
-#include <linux/export.h>
-#include <linux/shm.h>
-#include <linux/sched/signal.h>
-#include <linux/sched/mm.h>
-#include <linux/io.h>
-#include <linux/personality.h>
-#include <linux/random.h>
+#include <linux/types.h>
-#include <asm/cputype.h>
+#include <asm/page.h>
/*
* You really shouldn't be using read() or write() on /dev/mem. This might go
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: mm: Remove unused header file
2021-01-26 12:24 [PATCH] arm64: mm: Remove unused header file Shaokun Zhang
@ 2021-01-26 12:39 ` Will Deacon
2021-01-27 7:23 ` Shaokun Zhang
2021-01-26 23:39 ` Will Deacon
1 sibling, 1 reply; 4+ messages in thread
From: Will Deacon @ 2021-01-26 12:39 UTC (permalink / raw)
To: Shaokun Zhang; +Cc: Catalin Marinas, linux-arm-kernel
On Tue, Jan 26, 2021 at 08:24:44PM +0800, Shaokun Zhang wrote:
> Many header files are never used, let's remove them directly.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
> ---
> arch/arm64/mm/mmap.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c
> index 07937b49cb88..c66b3878712c 100644
> --- a/arch/arm64/mm/mmap.c
> +++ b/arch/arm64/mm/mmap.c
> @@ -5,20 +5,10 @@
> * Copyright (C) 2012 ARM Ltd.
> */
>
> -#include <linux/elf.h>
> -#include <linux/fs.h>
> #include <linux/memblock.h>
> -#include <linux/mm.h>
> -#include <linux/mman.h>
> -#include <linux/export.h>
> -#include <linux/shm.h>
> -#include <linux/sched/signal.h>
> -#include <linux/sched/mm.h>
> -#include <linux/io.h>
> -#include <linux/personality.h>
> -#include <linux/random.h>
> +#include <linux/types.h>
>
> -#include <asm/cputype.h>
> +#include <asm/page.h>
How did you determine that these are safe to remove?
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: mm: Remove unused header file
2021-01-26 12:24 [PATCH] arm64: mm: Remove unused header file Shaokun Zhang
2021-01-26 12:39 ` Will Deacon
@ 2021-01-26 23:39 ` Will Deacon
1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2021-01-26 23:39 UTC (permalink / raw)
To: linux-arm-kernel, Shaokun Zhang; +Cc: catalin.marinas, kernel-team, Will Deacon
On Tue, 26 Jan 2021 20:24:44 +0800, Shaokun Zhang wrote:
> Many header files are never used, let's remove them directly.
Passed allnoconfig, defconfig and allmodconfig builds, so applied to
arm64 (for-next/misc), thanks!
[1/1] arm64: mm: Remove unused header file
https://git.kernel.org/arm64/c/507d664450f8
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: mm: Remove unused header file
2021-01-26 12:39 ` Will Deacon
@ 2021-01-27 7:23 ` Shaokun Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Shaokun Zhang @ 2021-01-27 7:23 UTC (permalink / raw)
To: Will Deacon; +Cc: Catalin Marinas, linux-arm-kernel
Hi Will,
在 2021/1/26 20:39, Will Deacon 写道:
> On Tue, Jan 26, 2021 at 08:24:44PM +0800, Shaokun Zhang wrote:
>> Many header files are never used, let's remove them directly.
>>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will@kernel.org>
>> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
>> ---
>> arch/arm64/mm/mmap.c | 14 ++------------
>> 1 file changed, 2 insertions(+), 12 deletions(-)
>>
>> diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c
>> index 07937b49cb88..c66b3878712c 100644
>> --- a/arch/arm64/mm/mmap.c
>> +++ b/arch/arm64/mm/mmap.c
>> @@ -5,20 +5,10 @@
>> * Copyright (C) 2012 ARM Ltd.
>> */
>>
>> -#include <linux/elf.h>
>> -#include <linux/fs.h>
>> #include <linux/memblock.h>
>> -#include <linux/mm.h>
>> -#include <linux/mman.h>
>> -#include <linux/export.h>
>> -#include <linux/shm.h>
>> -#include <linux/sched/signal.h>
>> -#include <linux/sched/mm.h>
>> -#include <linux/io.h>
>> -#include <linux/personality.h>
>> -#include <linux/random.h>
>> +#include <linux/types.h>
>>
>> -#include <asm/cputype.h>
>> +#include <asm/page.h>
>
> How did you determine that these are safe to remove?
>
To be honest, it is done by observation when I dig my devmem failure.
I checked this file changed much and some header files are not necessary.
I did devmem test and it worked when I changed these.
Apologies that the io.h is still needed for the previous prototype.
Thanks,
Shaokun
> Will
> .
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-27 7:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 12:24 [PATCH] arm64: mm: Remove unused header file Shaokun Zhang
2021-01-26 12:39 ` Will Deacon
2021-01-27 7:23 ` Shaokun Zhang
2021-01-26 23:39 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox