diff mbox

powerpc: Drop include of linux/io.h from asm/io.h

Message ID 1492089276-13713-1-git-send-email-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 590c369e7ecc00be736be39ae0c62d1b5d563a51
Headers show

Commit Message

Michael Ellerman April 13, 2017, 1:14 p.m. UTC
Currently powerpc's asm/io.h includes linux/io.h, and linux/io.h
includes asm/io.h.

This can cause problems because depending on which is included first the
order of definitions between the two files will change.

The include of linux/io.h was added back in 2008 in commit b41e5fffe8b8
("[POWERPC] devres: Add devm_ioremap_prot()"). It's not entirely clear
it was needed then, but devm_ioremap_prot() has since been removed
entirely as unused, in dedd24a12fe6 ("powerpc: Remove unused
devm_ioremap_prot()").

So it seems to be unnecessary and can potentially cause problems, so
remove the include of linux/io.h from asm/io.h

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/io.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael Ellerman April 19, 2017, 3:47 a.m. UTC | #1
On Thu, 2017-04-13 at 13:14:36 UTC, Michael Ellerman wrote:
> Currently powerpc's asm/io.h includes linux/io.h, and linux/io.h
> includes asm/io.h.
> 
> This can cause problems because depending on which is included first the
> order of definitions between the two files will change.
> 
> The include of linux/io.h was added back in 2008 in commit b41e5fffe8b8
> ("[POWERPC] devres: Add devm_ioremap_prot()"). It's not entirely clear
> it was needed then, but devm_ioremap_prot() has since been removed
> entirely as unused, in dedd24a12fe6 ("powerpc: Remove unused
> devm_ioremap_prot()").
> 
> So it seems to be unnecessary and can potentially cause problems, so
> remove the include of linux/io.h from asm/io.h
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/590c369e7ecc00be736be39ae0c62d

cheers
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 5ed292431b5b..91919a98e5d0 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -25,8 +25,6 @@  extern struct pci_dev *isa_bridge_pcidev;
 #endif
 
 #include <linux/device.h>
-#include <linux/io.h>
-
 #include <linux/compiler.h>
 #include <asm/page.h>
 #include <asm/byteorder.h>