[PATCH] arm64: mm: Remove unused header file
Shaokun Zhang
zhangshaokun at hisilicon.com
Wed Jan 27 02:23:40 EST 2021
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 at arm.com>
>> Cc: Will Deacon <will at kernel.org>
>> Signed-off-by: Shaokun Zhang <zhangshaokun at 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
> .
>
More information about the linux-arm-kernel
mailing list