memblock: Remove unused io.h include
PATCH 1/1 memblock: Remove unused io.h include
Memblock does not use anything from io.h, remove the include.
--- mm/memblock.c | 1 - 1 file changed, 1 deletion(-)
mm/memblock.c +0 -1
@@ -18,7 +18,6 @@#include <linux/memblock.h> #include <asm/sections.h> -#include <linux/io.h> #include "internal.h"
Signature · 1 line
2.30.2
Mike Rapoport
maintainerHi Karolina,
Quoted 1 line · Karolina Drobnik
Memblock does not use anything from
io.h, remove the include.
As Matthew pointed out [1], many architectures put their definition of virt_to_phys() in asm/io.h, e.g.
arch/powerpc/include/asm/io.h:#define virt_to_phys virt_to_phys arch/sh/include/asm/io.h:#define virt_to_phys(address) ((unsigned long)(address)) arch/x86/include/asm/io.h:#define virt_to_phys virt_to_phys
which means memblock needs this header for declaration of virt_to_phys().
Although it is included indirectly, let's keep it for now.
[1] https://lore.kernel.org/all/[email protected]/
Quoted 21 lines
Suggested-by Matthew Wilcox (Oracle) <[email protected]>Signed-off-by Karolina Drobnik <[email protected]>--- mm/memblock.c | 1 - 1 file changed, 1 deletion(-)mm/memblock.c +0
-1@@ -18,7 +18,6 @@#include <linux/memblock.h> #include <asm/sections.h> -#include <linux/io.h> #include "internal.h" Signature · 1 line
2.30.2
Signature · 2 lines
Sincerely yours, Mike.
Hi Mike,
Thanks for taking a look at my patch.
Quoted 8 lines · Mike Rapoport
As Matthew pointed out [1], many architectures put their definition of
virt_to_phys()inasm/io.h, e.g.arch/powerpc/include/asm/io.h:#define
virt_to_physvirt_to_physarch/sh/include/asm/io.h:#define virt_to_phys(address) ((unsigned long)(address))
arch/x86/include/asm/io.h:#definevirt_to_physvirt_to_phys
Quoted 4 lines
which means memblock needs this header for declaration of
virt_to_phys().Although it is included indirectly, let's keep it for now.
OK, will leave it as it is then.
Many thanks,
Karolina
Quoted 4 lines · Karolina Drobnik
Memblock does not use anything from
io.h, remove the include.Suggested-by Matthew Wilcox (Oracle) <[email protected]>Signed-off-by Karolina Drobnik <[email protected]>
Looks good: