MIPS: Explicitly include correct DT includes
Subsystems (4)
PATCH 1/1 MIPS: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
--- arch/mips/bmips/setup.c | 1 - arch/mips/cavium-octeon/flash_setup.c | 3 ++- arch/mips/lantiq/irq.c | 2 +- arch/mips/lantiq/xway/dcdc.c | 3 ++- arch/mips/lantiq/xway/gptu.c | 4 ++-- arch/mips/lantiq/xway/sysctrl.c | 1 - arch/mips/lantiq/xway/vmmc.c | 3 ++- arch/mips/pci/pci-lantiq.c | 4 ++-- arch/mips/pci/pci-rt2880.c | 5 ++--- arch/mips/pic32/pic32mzda/config.c | 1 - arch/mips/ralink/irq.c | 2 +- arch/mips/ralink/of.c | 2 +- arch/mips/ralink/prom.c | 2 -- 13 files changed, 15 insertions(+), 18 deletions(-)
arch/mips/bmips/setup.c +0 -1
@@ -16,7 +16,6 @@#include <linux/of.h> #include <linux/of_clk.h> #include <linux/of_fdt.h> -#include <linux/of_platform.h> #include <linux/libfdt.h> #include <linux/smp.h> #include <asm/addrspace.h>
arch/mips/cavium-octeon/flash_setup.c +2 -1
@@ -12,7 +12,8 @@#include <linux/semaphore.h> #include <linux/mtd/mtd.h> #include <linux/mtd/map.h> -#include <linux/of_platform.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/mtd/partitions.h> #include <asm/octeon/octeon.h>
arch/mips/lantiq/irq.c +1 -1
@@ -10,7 +10,7 @@#include <linux/sched.h> #include <linux/irqchip.h> #include <linux/irqdomain.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h>
arch/mips/lantiq/xway/dcdc.c +2 -1
@@ -6,7 +6,8 @@*/ #include <linux/ioport.h> -#include <linux/of_platform.h> +#include <linux/mod_devicetable.h> +#include <linux/platform_device.h> #include <lantiq_soc.h>
arch/mips/lantiq/xway/gptu.c +2 -2
@@ -8,8 +8,8 @@#include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/init.h> -#include <linux/of_platform.h> -#include <linux/of_irq.h> +#include <linux/mod_devicetable.h> +#include <linux/platform_device.h> #include <lantiq_soc.h> #include "../clk.h"
arch/mips/lantiq/xway/sysctrl.c +0 -1
@@ -10,7 +10,6 @@#include <linux/clkdev.h> #include <linux/spinlock.h> #include <linux/of.h> -#include <linux/of_platform.h> #include <linux/of_address.h> #include <lantiq_soc.h>
arch/mips/lantiq/xway/vmmc.c +2 -1
@@ -7,7 +7,8 @@#include <linux/err.h> #include <linux/export.h> #include <linux/gpio/consumer.h> -#include <linux/of_platform.h> +#include <linux/mod_devicetable.h> +#include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <lantiq_soc.h>
arch/mips/pci/pci-lantiq.c +2 -2
@@ -13,9 +13,9 @@#include <linux/mm.h> #include <linux/vmalloc.h> #include <linux/clk.h> -#include <linux/of_platform.h> -#include <linux/of_irq.h> +#include <linux/of.h> #include <linux/of_pci.h> +#include <linux/platform_device.h> #include <asm/addrspace.h>
arch/mips/pci/pci-rt2880.c +2 -3
@@ -13,9 +13,8 @@#include <linux/pci.h> #include <linux/io.h> #include <linux/init.h> -#include <linux/of_platform.h> -#include <linux/of_irq.h> -#include <linux/of_pci.h> +#include <linux/mod_devicetable.h> +#include <linux/platform_device.h> #include <asm/mach-ralink/rt288x.h>
arch/mips/pic32/pic32mzda/config.c +0 -1
@@ -5,7 +5,6 @@*/ #include <linux/init.h> #include <linux/io.h> -#include <linux/of_platform.h> #include <asm/mach-pic32/pic32.h>
arch/mips/ralink/irq.c +1 -1
@@ -7,7 +7,7 @@#include <linux/io.h> #include <linux/bitops.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/irqdomain.h>
arch/mips/ralink/of.c +1 -1
@@ -14,7 +14,7 @@#include <linux/of_fdt.h> #include <linux/kernel.h> #include <linux/memblock.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/of_address.h> #include <asm/reboot.h>
arch/mips/ralink/prom.c +0 -2
@@ -7,8 +7,6 @@*/ #include <linux/string.h> -#include <linux/of_fdt.h> -#include <linux/of_platform.h> #include <asm/bootinfo.h> #include <asm/addrspace.h>
Signature · 1 line
2.40.1
Quoted 10 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>
Quoted 15 lines
--- arch/mips/bmips/setup.c | 1 - arch/mips/cavium-octeon/flash_setup.c | 3 ++- arch/mips/lantiq/irq.c | 2 +- arch/mips/lantiq/xway/dcdc.c | 3 ++- arch/mips/lantiq/xway/gptu.c | 4 ++-- arch/mips/lantiq/xway/sysctrl.c | 1 - arch/mips/lantiq/xway/vmmc.c | 3 ++- arch/mips/pci/pci-lantiq.c | 4 ++-- arch/mips/pci/pci-rt2880.c | 5 ++--- arch/mips/pic32/pic32mzda/config.c | 1 - arch/mips/ralink/irq.c | 2 +- arch/mips/ralink/of.c | 2 +- arch/mips/ralink/prom.c | 2 -- 13 files changed, 15 insertions(+), 18 deletions(-)
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Hi Rob,
Quoted 10 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>
Thanks for your patch, which is now commit 657c45b303f87d77 ("MIPS:
Explicitly include correct DT includes") in next-20230726.
arch/mips/lantiq/xway/gptu.c line 12
Quoted 8 lines
arch/mips/lantiq/xway/gptu.c +0
-2@@ -8,8 +8,8 @@#include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/init.h> -#include <linux/of_platform.h> -#include <linux/of_irq.h>
Based on https://lore.kernel.org/all/[email protected],
I guess you need to keep of_irq.h for of_irq_to_resource_table()?
arch/mips/lantiq/xway/gptu.c line 15
Quoted 5 lines
arch/mips/lantiq/xway/gptu.c +2
-0+#include <linux/mod_devicetable.h> +#include <linux/platform_device.h> #include <lantiq_soc.h> #include "../clk.h"
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 18 lines · Geert Uytterhoeven
Hi Rob,
Quoted 10 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>Thanks for your patch, which is now commit
657c45b303f87d77("MIPS:
Explicitly include correct DT includes") in next-20230726.
Quoted 11 lines
arch/mips/lantiq/xway/gptu.c line 12
Quoted 8 lines
arch/mips/lantiq/xway/gptu.c +0
-2@@ -8,8 +8,8 @@#include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/init.h> -#include <linux/of_platform.h> -#include <linux/of_irq.h> Based on https://lore.kernel.org/all/[email protected],
I guess you need to keepof_irq.hforof_irq_to_resource_table()?
Ugg, yes. Posting a fix momentarily.
Too many config combinations to test on some arches...
Rob