diff mbox series

[v3] of_device: removed #include that caused a recursion in included headers

Message ID 1587395080-15722-1-git-send-email-hadar.gat@arm.com (mailing list archive)
State New, archived
Headers show
Series [v3] of_device: removed #include that caused a recursion in included headers | expand

Commit Message

Hadar Gat April 20, 2020, 3:04 p.m. UTC
Both of_platform.h and of_device.h were included each other.
In of_device.h, removed unneeded #include to of_platform.h
and added include to of_platform.h in the files that needs it.

Signed-off-by: Hadar Gat <hadar.gat@arm.com>
Reported-by: kbuild test robot <lkp@intel.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
---
v3: add include to of_platform.h in more files. (reported due other builds)
v2: add include to of_platform.h in more files. (reported due other builds)

 arch/sparc/kernel/pci.c                           | 1 +
 arch/sparc/kernel/pci_sabre.c                     | 1 +
 arch/sparc/kernel/pci_schizo.c                    | 1 +
 arch/sparc/kernel/sbus.c                          | 1 +
 arch/sparc/mm/io-unit.c                           | 1 +
 arch/sparc/mm/iommu.c                             | 1 +
 drivers/base/platform.c                           | 1 +
 drivers/bus/imx-weim.c                            | 1 +
 drivers/bus/vexpress-config.c                     | 1 +
 drivers/clk/mediatek/clk-mt7622-aud.c             | 1 +
 drivers/dma/at_hdmac.c                            | 1 +
 drivers/dma/stm32-dmamux.c                        | 1 +
 drivers/dma/ti/dma-crossbar.c                     | 1 +
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c             | 1 +
 drivers/gpu/drm/msm/hdmi/hdmi.c                   | 1 +
 drivers/gpu/drm/msm/msm_drv.c                     | 1 +
 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   | 1 +
 drivers/gpu/drm/sun4i/sun4i_tcon.c                | 1 +
 drivers/iio/adc/stm32-adc-core.c                  | 1 +
 drivers/iio/adc/stm32-dfsdm-adc.c                 | 1 +
 drivers/iio/adc/stm32-dfsdm-core.c                | 1 +
 drivers/iommu/tegra-smmu.c                        | 1 +
 drivers/media/platform/coda/coda-common.c         | 1 +
 drivers/memory/atmel-ebi.c                        | 1 +
 drivers/mfd/palmas.c                              | 1 +
 drivers/mfd/ssbi.c                                | 1 +
 drivers/mtd/nand/raw/omap2.c                      | 1 +
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
 drivers/net/ethernet/ti/cpsw.c                    | 1 +
 drivers/phy/tegra/xusb.c                          | 1 +
 drivers/pinctrl/freescale/pinctrl-imx1-core.c     | 1 +
 drivers/pinctrl/nomadik/pinctrl-nomadik.c         | 1 +
 drivers/soc/samsung/exynos-pmu.c                  | 1 +
 drivers/soc/sunxi/sunxi_sram.c                    | 1 +
 include/linux/of_device.h                         | 2 --
 lib/genalloc.c                                    | 1 +
 36 files changed, 35 insertions(+), 2 deletions(-)

Comments

Liviu Dudau April 22, 2020, 12:09 p.m. UTC | #1
On Mon, Apr 20, 2020 at 06:04:29PM +0300, Hadar Gat wrote:
> Both of_platform.h and of_device.h were included each other.
> In of_device.h, removed unneeded #include to of_platform.h
> and added include to of_platform.h in the files that needs it.
> 
> Signed-off-by: Hadar Gat <hadar.gat@arm.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
> Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
> ---
> v3: add include to of_platform.h in more files. (reported due other builds)
> v2: add include to of_platform.h in more files. (reported due other builds)
> 
>  arch/sparc/kernel/pci.c                           | 1 +
>  arch/sparc/kernel/pci_sabre.c                     | 1 +
>  arch/sparc/kernel/pci_schizo.c                    | 1 +
>  arch/sparc/kernel/sbus.c                          | 1 +
>  arch/sparc/mm/io-unit.c                           | 1 +
>  arch/sparc/mm/iommu.c                             | 1 +
>  drivers/base/platform.c                           | 1 +
>  drivers/bus/imx-weim.c                            | 1 +
>  drivers/bus/vexpress-config.c                     | 1 +

For drivers/bus/vexpress-config.c:

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

>  drivers/clk/mediatek/clk-mt7622-aud.c             | 1 +
>  drivers/dma/at_hdmac.c                            | 1 +
>  drivers/dma/stm32-dmamux.c                        | 1 +
>  drivers/dma/ti/dma-crossbar.c                     | 1 +
>  drivers/gpu/drm/msm/adreno/a6xx_gmu.c             | 1 +
>  drivers/gpu/drm/msm/hdmi/hdmi.c                   | 1 +
>  drivers/gpu/drm/msm/msm_drv.c                     | 1 +
>  drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   | 1 +
>  drivers/gpu/drm/sun4i/sun4i_tcon.c                | 1 +
>  drivers/iio/adc/stm32-adc-core.c                  | 1 +
>  drivers/iio/adc/stm32-dfsdm-adc.c                 | 1 +
>  drivers/iio/adc/stm32-dfsdm-core.c                | 1 +
>  drivers/iommu/tegra-smmu.c                        | 1 +
>  drivers/media/platform/coda/coda-common.c         | 1 +
>  drivers/memory/atmel-ebi.c                        | 1 +
>  drivers/mfd/palmas.c                              | 1 +
>  drivers/mfd/ssbi.c                                | 1 +
>  drivers/mtd/nand/raw/omap2.c                      | 1 +
>  drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
>  drivers/net/ethernet/ti/cpsw.c                    | 1 +
>  drivers/phy/tegra/xusb.c                          | 1 +
>  drivers/pinctrl/freescale/pinctrl-imx1-core.c     | 1 +
>  drivers/pinctrl/nomadik/pinctrl-nomadik.c         | 1 +
>  drivers/soc/samsung/exynos-pmu.c                  | 1 +
>  drivers/soc/sunxi/sunxi_sram.c                    | 1 +
>  include/linux/of_device.h                         | 2 --
>  lib/genalloc.c                                    | 1 +
>  36 files changed, 35 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
> index 5ed4382..89ea658 100644
> --- a/arch/sparc/kernel/pci.c
> +++ b/arch/sparc/kernel/pci.c
> @@ -21,6 +21,7 @@
>  #include <linux/init.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  #include <linux/uaccess.h>
>  #include <asm/pgtable.h>
> diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
> index 3c38ca4..16761d0 100644
> --- a/arch/sparc/kernel/pci_sabre.c
> +++ b/arch/sparc/kernel/pci_sabre.c
> @@ -14,6 +14,7 @@
>  #include <linux/slab.h>
>  #include <linux/interrupt.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  #include <asm/apb.h>
>  #include <asm/iommu.h>
> diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
> index 421aba0..733f069 100644
> --- a/arch/sparc/kernel/pci_schizo.c
> +++ b/arch/sparc/kernel/pci_schizo.c
> @@ -12,6 +12,7 @@
>  #include <linux/export.h>
>  #include <linux/interrupt.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/numa.h>
>  
>  #include <asm/iommu.h>
> diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c
> index 32141e1..2f4051f 100644
> --- a/arch/sparc/kernel/sbus.c
> +++ b/arch/sparc/kernel/sbus.c
> @@ -15,6 +15,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/numa.h>
>  
>  #include <asm/page.h>
> diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
> index 289276b..5638399 100644
> --- a/arch/sparc/mm/io-unit.c
> +++ b/arch/sparc/mm/io-unit.c
> @@ -15,6 +15,7 @@
>  #include <linux/dma-mapping.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  #include <asm/pgalloc.h>
>  #include <asm/pgtable.h>
> diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
> index b00dde1..9cbb2e7 100644
> --- a/arch/sparc/mm/iommu.c
> +++ b/arch/sparc/mm/iommu.c
> @@ -16,6 +16,7 @@
>  #include <linux/dma-mapping.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  #include <asm/pgalloc.h>
>  #include <asm/pgtable.h>
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 5255550..f549274b 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -12,6 +12,7 @@
>  #include <linux/string.h>
>  #include <linux/platform_device.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_irq.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
> diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
> index 28bb65a..8c786da 100644
> --- a/drivers/bus/imx-weim.c
> +++ b/drivers/bus/imx-weim.c
> @@ -11,6 +11,7 @@
>  #include <linux/clk.h>
>  #include <linux/io.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/mfd/syscon.h>
>  #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
>  #include <linux/regmap.h>
> diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
> index ff70575..12b8b0b 100644
> --- a/drivers/bus/vexpress-config.c
> +++ b/drivers/bus/vexpress-config.c
> @@ -8,6 +8,7 @@
>  #include <linux/init.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/vexpress.h>
>  
>  
> diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
> index 2bd4295..8cbb68f 100644
> --- a/drivers/clk/mediatek/clk-mt7622-aud.c
> +++ b/drivers/clk/mediatek/clk-mt7622-aud.c
> @@ -9,6 +9,7 @@
>  #include <linux/of.h>
>  #include <linux/of_address.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  
>  #include "clk-mtk.h"
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 73a2078..388f8e10 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -20,6 +20,7 @@
>  #include <linux/slab.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_dma.h>
>  
>  #include "at_hdmac_regs.h"
> diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
> index 12f7637..b704896 100644
> --- a/drivers/dma/stm32-dmamux.c
> +++ b/drivers/dma/stm32-dmamux.c
> @@ -16,6 +16,7 @@
>  #include <linux/init.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_dma.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/reset.h>
> diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c
> index 4ba8fa5..2c0fd44 100644
> --- a/drivers/dma/ti/dma-crossbar.c
> +++ b/drivers/dma/ti/dma-crossbar.c
> @@ -10,6 +10,7 @@
>  #include <linux/io.h>
>  #include <linux/of_address.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_dma.h>
>  
>  #define TI_XBAR_DRA7		0
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index c4e71ab..f523254 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -6,6 +6,7 @@
>  #include <linux/interconnect.h>
>  #include <linux/pm_domain.h>
>  #include <linux/pm_opp.h>
> +#include <linux/of_platform.h>
>  #include <soc/qcom/cmd-db.h>
>  
>  #include "a6xx_gpu.h"
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
> index 737453b..5034d40 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
> @@ -7,6 +7,7 @@
>  
>  #include <linux/of_irq.h>
>  #include <linux/of_gpio.h>
> +#include <linux/of_platform.h>
>  
>  #include <sound/hdmi-codec.h>
>  #include "hdmi.h"
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 29295de..ddc9e85 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -8,6 +8,7 @@
>  #include <linux/dma-mapping.h>
>  #include <linux/kthread.h>
>  #include <linux/uaccess.h>
> +#include <linux/of_platform.h>
>  #include <uapi/linux/sched/types.h>
>  
>  #include <drm/drm_drv.h>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
> index 6e1270e..d038bae 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
> @@ -12,6 +12,7 @@
>  #include <linux/mfd/syscon.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/phy/phy.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/regmap.h>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> index 624437b..aa35757 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> @@ -11,6 +11,7 @@
>  #include <linux/module.h>
>  #include <linux/of_address.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_irq.h>
>  #include <linux/regmap.h>
>  #include <linux/reset.h>
> diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> index 2df88d2..3dc3453 100644
> --- a/drivers/iio/adc/stm32-adc-core.c
> +++ b/drivers/iio/adc/stm32-adc-core.c
> @@ -17,6 +17,7 @@
>  #include <linux/mfd/syscon.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/regmap.h>
>  #include <linux/regulator/consumer.h>
> diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c
> index 76a60d9..e83848cb 100644
> --- a/drivers/iio/adc/stm32-dfsdm-adc.c
> +++ b/drivers/iio/adc/stm32-dfsdm-adc.c
> @@ -20,6 +20,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/regmap.h>
>  #include <linux/slab.h>
> diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
> index 26e2011..f6a53ab 100644
> --- a/drivers/iio/adc/stm32-dfsdm-core.c
> +++ b/drivers/iio/adc/stm32-dfsdm-core.c
> @@ -12,6 +12,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/pinctrl/consumer.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/regmap.h>
> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> index 63a147b..3797caa 100644
> --- a/drivers/iommu/tegra-smmu.c
> +++ b/drivers/iommu/tegra-smmu.c
> @@ -10,6 +10,7 @@
>  #include <linux/kernel.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/dma-mapping.h>
> diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
> index d0d093d..0874824 100644
> --- a/drivers/media/platform/coda/coda-common.c
> +++ b/drivers/media/platform/coda/coda-common.c
> @@ -20,6 +20,7 @@
>  #include <linux/kfifo.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/slab.h>
> diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
> index 14386d0..272b1a8 100644
> --- a/drivers/memory/atmel-ebi.c
> +++ b/drivers/memory/atmel-ebi.c
> @@ -13,6 +13,7 @@
>  #include <linux/mfd/syscon/atmel-smc.h>
>  #include <linux/init.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/regmap.h>
>  #include <soc/at91/atmel-sfr.h>
>  
> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> index f5b3fa9..cca44bc 100644
> --- a/drivers/mfd/palmas.c
> +++ b/drivers/mfd/palmas.c
> @@ -19,6 +19,7 @@
>  #include <linux/mfd/core.h>
>  #include <linux/mfd/palmas.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = {
>  	{
> diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
> index 94f60df..72cd45a 100644
> --- a/drivers/mfd/ssbi.c
> +++ b/drivers/mfd/ssbi.c
> @@ -20,6 +20,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  /* SSBI 2.0 controller registers */
>  #define SSBI2_CMD			0x0008
> diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c
> index ad77c11..d851ec7 100644
> --- a/drivers/mtd/nand/raw/omap2.c
> +++ b/drivers/mtd/nand/raw/omap2.c
> @@ -22,6 +22,7 @@
>  #include <linux/slab.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  
>  #include <linux/mtd/nand_bch.h>
>  #include <linux/platform_data/elm.h>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> index 58e0511..d704d57 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> @@ -12,6 +12,7 @@
>  #include <linux/mfd/syscon.h>
>  #include <linux/module.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_mdio.h>
>  #include <linux/of_net.h>
>  #include <linux/phy.h>
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index c2c5bf8..6932945 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -28,6 +28,7 @@
>  #include <linux/of_mdio.h>
>  #include <linux/of_net.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/if_vlan.h>
>  #include <linux/kmemleak.h>
>  #include <linux/sys_soc.h>
> diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
> index de4a46f..0eac1b8 100644
> --- a/drivers/phy/tegra/xusb.c
> +++ b/drivers/phy/tegra/xusb.c
> @@ -9,6 +9,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/phy/phy.h>
>  #include <linux/phy/tegra/xusb.h>
>  #include <linux/platform_device.h>
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
> index c00d002..d1c171e 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
> @@ -16,6 +16,7 @@
>  #include <linux/io.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/pinctrl/machine.h>
>  #include <linux/pinctrl/pinconf.h>
>  #include <linux/pinctrl/pinctrl.h>
> diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
> index ca7bbe4..44974ac 100644
> --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
> +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
> @@ -19,6 +19,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/slab.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/of_address.h>
>  #include <linux/bitops.h>
>  #include <linux/pinctrl/machine.h>
> diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c
> index 17304fa..25129b0 100644
> --- a/drivers/soc/samsung/exynos-pmu.c
> +++ b/drivers/soc/samsung/exynos-pmu.c
> @@ -8,6 +8,7 @@
>  #include <linux/of.h>
>  #include <linux/of_address.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/mfd/syscon.h>
>  #include <linux/platform_device.h>
>  #include <linux/delay.h>
> diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
> index 1b0d50f..423cec3 100644
> --- a/drivers/soc/sunxi/sunxi_sram.c
> +++ b/drivers/soc/sunxi/sunxi_sram.c
> @@ -16,6 +16,7 @@
>  #include <linux/of.h>
>  #include <linux/of_address.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/regmap.h>
>  
> diff --git a/include/linux/of_device.h b/include/linux/of_device.h
> index 8d31e39..752999b 100644
> --- a/include/linux/of_device.h
> +++ b/include/linux/of_device.h
> @@ -4,8 +4,6 @@
>  
>  #include <linux/cpu.h>
>  #include <linux/platform_device.h>
> -#include <linux/of_platform.h> /* temporary until merge */
> -
>  #include <linux/of.h>
>  #include <linux/mod_devicetable.h>
>  
> diff --git a/lib/genalloc.c b/lib/genalloc.c
> index 7f1244b..08e21eeb 100644
> --- a/lib/genalloc.c
> +++ b/lib/genalloc.c
> @@ -33,6 +33,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/genalloc.h>
>  #include <linux/of_device.h>
> +#include <linux/of_platform.h>
>  #include <linux/vmalloc.h>
>  
>  static inline size_t chunk_size(const struct gen_pool_chunk *chunk)
> -- 
> 2.7.4
>
kernel test robot April 23, 2020, 5:27 a.m. UTC | #2
Hi Hadar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on sparc/master]
[also build test ERROR on stm32/stm32-next linus/master v5.7-rc2 next-20200422]
[cannot apply to sparc-next/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Hadar-Gat/of_device-removed-include-that-caused-a-recursion-in-included-headers/20200423-040844
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git master
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/firmware/ti_sci.c: In function 'ti_sci_probe':
>> drivers/firmware/ti_sci.c:3520:9: error: implicit declaration of function 'of_platform_populate' [-Werror=implicit-function-declaration]
    3520 |  return of_platform_populate(dev->of_node, NULL, NULL, dev);
         |         ^~~~~~~~~~~~~~~~~~~~
   drivers/firmware/ti_sci.c: In function 'ti_sci_remove':
>> drivers/firmware/ti_sci.c:3536:2: error: implicit declaration of function 'of_platform_depopulate' [-Werror=implicit-function-declaration]
    3536 |  of_platform_depopulate(dev);
         |  ^~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/firmware/tegra/bpmp.c: In function 'tegra_bpmp_get':
>> drivers/firmware/tegra/bpmp.c:51:9: error: implicit declaration of function 'of_find_device_by_node'; did you mean 'bus_find_device_by_fwnode'? [-Werror=implicit-function-declaration]
      51 |  pdev = of_find_device_by_node(np);
         |         ^~~~~~~~~~~~~~~~~~~~~~
         |         bus_find_device_by_fwnode
   drivers/firmware/tegra/bpmp.c:51:7: warning: assignment to 'struct platform_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      51 |  pdev = of_find_device_by_node(np);
         |       ^
   drivers/firmware/tegra/bpmp.c: In function 'tegra_bpmp_probe':
>> drivers/firmware/tegra/bpmp.c:759:8: error: implicit declaration of function 'of_platform_default_populate' [-Werror=implicit-function-declaration]
     759 |  err = of_platform_default_populate(pdev->dev.of_node, NULL, &pdev->dev);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c: In function 'sun8i_dw_hdmi_find_connector_pdev':
>> drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c:115:9: error: implicit declaration of function 'of_find_device_by_node'; did you mean 'of_find_i2c_device_by_node'? [-Werror=implicit-function-declaration]
     115 |  pdev = of_find_device_by_node(remote);
         |         ^~~~~~~~~~~~~~~~~~~~~~
         |         of_find_i2c_device_by_node
   drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c:115:7: warning: assignment to 'struct platform_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     115 |  pdev = of_find_device_by_node(remote);
         |       ^
   cc1: some warnings being treated as errors

vim +/of_platform_populate +3520 drivers/firmware/ti_sci.c

aa276781a64a5f Nishanth Menon 2016-10-18  3385  
aa276781a64a5f Nishanth Menon 2016-10-18  3386  static int ti_sci_probe(struct platform_device *pdev)
aa276781a64a5f Nishanth Menon 2016-10-18  3387  {
aa276781a64a5f Nishanth Menon 2016-10-18  3388  	struct device *dev = &pdev->dev;
aa276781a64a5f Nishanth Menon 2016-10-18  3389  	const struct of_device_id *of_id;
aa276781a64a5f Nishanth Menon 2016-10-18  3390  	const struct ti_sci_desc *desc;
aa276781a64a5f Nishanth Menon 2016-10-18  3391  	struct ti_sci_xfer *xfer;
aa276781a64a5f Nishanth Menon 2016-10-18  3392  	struct ti_sci_info *info = NULL;
aa276781a64a5f Nishanth Menon 2016-10-18  3393  	struct ti_sci_xfers_info *minfo;
aa276781a64a5f Nishanth Menon 2016-10-18  3394  	struct mbox_client *cl;
aa276781a64a5f Nishanth Menon 2016-10-18  3395  	int ret = -EINVAL;
aa276781a64a5f Nishanth Menon 2016-10-18  3396  	int i;
912cffb4ed8612 Nishanth Menon 2016-10-18  3397  	int reboot = 0;
e69a35531589a2 Nishanth Menon 2018-08-28  3398  	u32 h_id;
aa276781a64a5f Nishanth Menon 2016-10-18  3399  
aa276781a64a5f Nishanth Menon 2016-10-18  3400  	of_id = of_match_device(ti_sci_of_match, dev);
aa276781a64a5f Nishanth Menon 2016-10-18  3401  	if (!of_id) {
aa276781a64a5f Nishanth Menon 2016-10-18  3402  		dev_err(dev, "OF data missing\n");
aa276781a64a5f Nishanth Menon 2016-10-18  3403  		return -EINVAL;
aa276781a64a5f Nishanth Menon 2016-10-18  3404  	}
aa276781a64a5f Nishanth Menon 2016-10-18  3405  	desc = of_id->data;
aa276781a64a5f Nishanth Menon 2016-10-18  3406  
aa276781a64a5f Nishanth Menon 2016-10-18  3407  	info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
aa276781a64a5f Nishanth Menon 2016-10-18  3408  	if (!info)
aa276781a64a5f Nishanth Menon 2016-10-18  3409  		return -ENOMEM;
aa276781a64a5f Nishanth Menon 2016-10-18  3410  
aa276781a64a5f Nishanth Menon 2016-10-18  3411  	info->dev = dev;
aa276781a64a5f Nishanth Menon 2016-10-18  3412  	info->desc = desc;
e69a35531589a2 Nishanth Menon 2018-08-28  3413  	ret = of_property_read_u32(dev->of_node, "ti,host-id", &h_id);
e69a35531589a2 Nishanth Menon 2018-08-28  3414  	/* if the property is not present in DT, use a default from desc */
e69a35531589a2 Nishanth Menon 2018-08-28  3415  	if (ret < 0) {
e69a35531589a2 Nishanth Menon 2018-08-28  3416  		info->host_id = info->desc->default_host_id;
e69a35531589a2 Nishanth Menon 2018-08-28  3417  	} else {
e69a35531589a2 Nishanth Menon 2018-08-28  3418  		if (!h_id) {
e69a35531589a2 Nishanth Menon 2018-08-28  3419  			dev_warn(dev, "Host ID 0 is reserved for firmware\n");
e69a35531589a2 Nishanth Menon 2018-08-28  3420  			info->host_id = info->desc->default_host_id;
e69a35531589a2 Nishanth Menon 2018-08-28  3421  		} else {
e69a35531589a2 Nishanth Menon 2018-08-28  3422  			info->host_id = h_id;
e69a35531589a2 Nishanth Menon 2018-08-28  3423  		}
e69a35531589a2 Nishanth Menon 2018-08-28  3424  	}
e69a35531589a2 Nishanth Menon 2018-08-28  3425  
912cffb4ed8612 Nishanth Menon 2016-10-18  3426  	reboot = of_property_read_bool(dev->of_node,
912cffb4ed8612 Nishanth Menon 2016-10-18  3427  				       "ti,system-reboot-controller");
aa276781a64a5f Nishanth Menon 2016-10-18  3428  	INIT_LIST_HEAD(&info->node);
aa276781a64a5f Nishanth Menon 2016-10-18  3429  	minfo = &info->minfo;
aa276781a64a5f Nishanth Menon 2016-10-18  3430  
aa276781a64a5f Nishanth Menon 2016-10-18  3431  	/*
aa276781a64a5f Nishanth Menon 2016-10-18  3432  	 * Pre-allocate messages
aa276781a64a5f Nishanth Menon 2016-10-18  3433  	 * NEVER allocate more than what we can indicate in hdr.seq
aa276781a64a5f Nishanth Menon 2016-10-18  3434  	 * if we have data description bug, force a fix..
aa276781a64a5f Nishanth Menon 2016-10-18  3435  	 */
aa276781a64a5f Nishanth Menon 2016-10-18  3436  	if (WARN_ON(desc->max_msgs >=
aa276781a64a5f Nishanth Menon 2016-10-18  3437  		    1 << 8 * sizeof(((struct ti_sci_msg_hdr *)0)->seq)))
aa276781a64a5f Nishanth Menon 2016-10-18  3438  		return -EINVAL;
aa276781a64a5f Nishanth Menon 2016-10-18  3439  
aa276781a64a5f Nishanth Menon 2016-10-18  3440  	minfo->xfer_block = devm_kcalloc(dev,
aa276781a64a5f Nishanth Menon 2016-10-18  3441  					 desc->max_msgs,
aa276781a64a5f Nishanth Menon 2016-10-18  3442  					 sizeof(*minfo->xfer_block),
aa276781a64a5f Nishanth Menon 2016-10-18  3443  					 GFP_KERNEL);
aa276781a64a5f Nishanth Menon 2016-10-18  3444  	if (!minfo->xfer_block)
aa276781a64a5f Nishanth Menon 2016-10-18  3445  		return -ENOMEM;
aa276781a64a5f Nishanth Menon 2016-10-18  3446  
a86854d0c599b3 Kees Cook      2018-06-12  3447  	minfo->xfer_alloc_table = devm_kcalloc(dev,
a86854d0c599b3 Kees Cook      2018-06-12  3448  					       BITS_TO_LONGS(desc->max_msgs),
a86854d0c599b3 Kees Cook      2018-06-12  3449  					       sizeof(unsigned long),
aa276781a64a5f Nishanth Menon 2016-10-18  3450  					       GFP_KERNEL);
aa276781a64a5f Nishanth Menon 2016-10-18  3451  	if (!minfo->xfer_alloc_table)
aa276781a64a5f Nishanth Menon 2016-10-18  3452  		return -ENOMEM;
aa276781a64a5f Nishanth Menon 2016-10-18  3453  	bitmap_zero(minfo->xfer_alloc_table, desc->max_msgs);
aa276781a64a5f Nishanth Menon 2016-10-18  3454  
aa276781a64a5f Nishanth Menon 2016-10-18  3455  	/* Pre-initialize the buffer pointer to pre-allocated buffers */
aa276781a64a5f Nishanth Menon 2016-10-18  3456  	for (i = 0, xfer = minfo->xfer_block; i < desc->max_msgs; i++, xfer++) {
aa276781a64a5f Nishanth Menon 2016-10-18  3457  		xfer->xfer_buf = devm_kcalloc(dev, 1, desc->max_msg_size,
aa276781a64a5f Nishanth Menon 2016-10-18  3458  					      GFP_KERNEL);
aa276781a64a5f Nishanth Menon 2016-10-18  3459  		if (!xfer->xfer_buf)
aa276781a64a5f Nishanth Menon 2016-10-18  3460  			return -ENOMEM;
aa276781a64a5f Nishanth Menon 2016-10-18  3461  
aa276781a64a5f Nishanth Menon 2016-10-18  3462  		xfer->tx_message.buf = xfer->xfer_buf;
aa276781a64a5f Nishanth Menon 2016-10-18  3463  		init_completion(&xfer->done);
aa276781a64a5f Nishanth Menon 2016-10-18  3464  	}
aa276781a64a5f Nishanth Menon 2016-10-18  3465  
aa276781a64a5f Nishanth Menon 2016-10-18  3466  	ret = ti_sci_debugfs_create(pdev, info);
aa276781a64a5f Nishanth Menon 2016-10-18  3467  	if (ret)
aa276781a64a5f Nishanth Menon 2016-10-18  3468  		dev_warn(dev, "Failed to create debug file\n");
aa276781a64a5f Nishanth Menon 2016-10-18  3469  
aa276781a64a5f Nishanth Menon 2016-10-18  3470  	platform_set_drvdata(pdev, info);
aa276781a64a5f Nishanth Menon 2016-10-18  3471  
aa276781a64a5f Nishanth Menon 2016-10-18  3472  	cl = &info->cl;
aa276781a64a5f Nishanth Menon 2016-10-18  3473  	cl->dev = dev;
aa276781a64a5f Nishanth Menon 2016-10-18  3474  	cl->tx_block = false;
aa276781a64a5f Nishanth Menon 2016-10-18  3475  	cl->rx_callback = ti_sci_rx_callback;
aa276781a64a5f Nishanth Menon 2016-10-18  3476  	cl->knows_txdone = true;
aa276781a64a5f Nishanth Menon 2016-10-18  3477  
aa276781a64a5f Nishanth Menon 2016-10-18  3478  	spin_lock_init(&minfo->xfer_lock);
aa276781a64a5f Nishanth Menon 2016-10-18  3479  	sema_init(&minfo->sem_xfer_count, desc->max_msgs);
aa276781a64a5f Nishanth Menon 2016-10-18  3480  
aa276781a64a5f Nishanth Menon 2016-10-18  3481  	info->chan_rx = mbox_request_channel_byname(cl, "rx");
aa276781a64a5f Nishanth Menon 2016-10-18  3482  	if (IS_ERR(info->chan_rx)) {
aa276781a64a5f Nishanth Menon 2016-10-18  3483  		ret = PTR_ERR(info->chan_rx);
aa276781a64a5f Nishanth Menon 2016-10-18  3484  		goto out;
aa276781a64a5f Nishanth Menon 2016-10-18  3485  	}
aa276781a64a5f Nishanth Menon 2016-10-18  3486  
aa276781a64a5f Nishanth Menon 2016-10-18  3487  	info->chan_tx = mbox_request_channel_byname(cl, "tx");
aa276781a64a5f Nishanth Menon 2016-10-18  3488  	if (IS_ERR(info->chan_tx)) {
aa276781a64a5f Nishanth Menon 2016-10-18  3489  		ret = PTR_ERR(info->chan_tx);
aa276781a64a5f Nishanth Menon 2016-10-18  3490  		goto out;
aa276781a64a5f Nishanth Menon 2016-10-18  3491  	}
aa276781a64a5f Nishanth Menon 2016-10-18  3492  	ret = ti_sci_cmd_get_revision(info);
aa276781a64a5f Nishanth Menon 2016-10-18  3493  	if (ret) {
aa276781a64a5f Nishanth Menon 2016-10-18  3494  		dev_err(dev, "Unable to communicate with TISCI(%d)\n", ret);
aa276781a64a5f Nishanth Menon 2016-10-18  3495  		goto out;
aa276781a64a5f Nishanth Menon 2016-10-18  3496  	}
aa276781a64a5f Nishanth Menon 2016-10-18  3497  
9e7d756da7a5b0 Nishanth Menon 2016-10-18  3498  	ti_sci_setup_ops(info);
9e7d756da7a5b0 Nishanth Menon 2016-10-18  3499  
912cffb4ed8612 Nishanth Menon 2016-10-18  3500  	if (reboot) {
912cffb4ed8612 Nishanth Menon 2016-10-18  3501  		info->nb.notifier_call = tisci_reboot_handler;
912cffb4ed8612 Nishanth Menon 2016-10-18  3502  		info->nb.priority = 128;
912cffb4ed8612 Nishanth Menon 2016-10-18  3503  
912cffb4ed8612 Nishanth Menon 2016-10-18  3504  		ret = register_restart_handler(&info->nb);
912cffb4ed8612 Nishanth Menon 2016-10-18  3505  		if (ret) {
912cffb4ed8612 Nishanth Menon 2016-10-18  3506  			dev_err(dev, "reboot registration fail(%d)\n", ret);
912cffb4ed8612 Nishanth Menon 2016-10-18  3507  			return ret;
912cffb4ed8612 Nishanth Menon 2016-10-18  3508  		}
912cffb4ed8612 Nishanth Menon 2016-10-18  3509  	}
912cffb4ed8612 Nishanth Menon 2016-10-18  3510  
aa276781a64a5f Nishanth Menon 2016-10-18  3511  	dev_info(dev, "ABI: %d.%d (firmware rev 0x%04x '%s')\n",
aa276781a64a5f Nishanth Menon 2016-10-18  3512  		 info->handle.version.abi_major, info->handle.version.abi_minor,
aa276781a64a5f Nishanth Menon 2016-10-18  3513  		 info->handle.version.firmware_revision,
aa276781a64a5f Nishanth Menon 2016-10-18  3514  		 info->handle.version.firmware_description);
aa276781a64a5f Nishanth Menon 2016-10-18  3515  
aa276781a64a5f Nishanth Menon 2016-10-18  3516  	mutex_lock(&ti_sci_list_mutex);
aa276781a64a5f Nishanth Menon 2016-10-18  3517  	list_add_tail(&info->node, &ti_sci_list);
aa276781a64a5f Nishanth Menon 2016-10-18  3518  	mutex_unlock(&ti_sci_list_mutex);
aa276781a64a5f Nishanth Menon 2016-10-18  3519  
aa276781a64a5f Nishanth Menon 2016-10-18 @3520  	return of_platform_populate(dev->of_node, NULL, NULL, dev);
aa276781a64a5f Nishanth Menon 2016-10-18  3521  out:
aa276781a64a5f Nishanth Menon 2016-10-18  3522  	if (!IS_ERR(info->chan_tx))
aa276781a64a5f Nishanth Menon 2016-10-18  3523  		mbox_free_channel(info->chan_tx);
aa276781a64a5f Nishanth Menon 2016-10-18  3524  	if (!IS_ERR(info->chan_rx))
aa276781a64a5f Nishanth Menon 2016-10-18  3525  		mbox_free_channel(info->chan_rx);
aa276781a64a5f Nishanth Menon 2016-10-18  3526  	debugfs_remove(info->d);
aa276781a64a5f Nishanth Menon 2016-10-18  3527  	return ret;
aa276781a64a5f Nishanth Menon 2016-10-18  3528  }
aa276781a64a5f Nishanth Menon 2016-10-18  3529  
aa276781a64a5f Nishanth Menon 2016-10-18  3530  static int ti_sci_remove(struct platform_device *pdev)
aa276781a64a5f Nishanth Menon 2016-10-18  3531  {
aa276781a64a5f Nishanth Menon 2016-10-18  3532  	struct ti_sci_info *info;
aa276781a64a5f Nishanth Menon 2016-10-18  3533  	struct device *dev = &pdev->dev;
aa276781a64a5f Nishanth Menon 2016-10-18  3534  	int ret = 0;
aa276781a64a5f Nishanth Menon 2016-10-18  3535  
aa276781a64a5f Nishanth Menon 2016-10-18 @3536  	of_platform_depopulate(dev);
aa276781a64a5f Nishanth Menon 2016-10-18  3537  
aa276781a64a5f Nishanth Menon 2016-10-18  3538  	info = platform_get_drvdata(pdev);
aa276781a64a5f Nishanth Menon 2016-10-18  3539  
912cffb4ed8612 Nishanth Menon 2016-10-18  3540  	if (info->nb.notifier_call)
912cffb4ed8612 Nishanth Menon 2016-10-18  3541  		unregister_restart_handler(&info->nb);
912cffb4ed8612 Nishanth Menon 2016-10-18  3542  
aa276781a64a5f Nishanth Menon 2016-10-18  3543  	mutex_lock(&ti_sci_list_mutex);
aa276781a64a5f Nishanth Menon 2016-10-18  3544  	if (info->users)
aa276781a64a5f Nishanth Menon 2016-10-18  3545  		ret = -EBUSY;
aa276781a64a5f Nishanth Menon 2016-10-18  3546  	else
aa276781a64a5f Nishanth Menon 2016-10-18  3547  		list_del(&info->node);
aa276781a64a5f Nishanth Menon 2016-10-18  3548  	mutex_unlock(&ti_sci_list_mutex);
aa276781a64a5f Nishanth Menon 2016-10-18  3549  
aa276781a64a5f Nishanth Menon 2016-10-18  3550  	if (!ret) {
aa276781a64a5f Nishanth Menon 2016-10-18  3551  		ti_sci_debugfs_destroy(pdev, info);
aa276781a64a5f Nishanth Menon 2016-10-18  3552  
aa276781a64a5f Nishanth Menon 2016-10-18  3553  		/* Safe to free channels since no more users */
aa276781a64a5f Nishanth Menon 2016-10-18  3554  		mbox_free_channel(info->chan_tx);
aa276781a64a5f Nishanth Menon 2016-10-18  3555  		mbox_free_channel(info->chan_rx);
aa276781a64a5f Nishanth Menon 2016-10-18  3556  	}
aa276781a64a5f Nishanth Menon 2016-10-18  3557  
aa276781a64a5f Nishanth Menon 2016-10-18  3558  	return ret;
aa276781a64a5f Nishanth Menon 2016-10-18  3559  }
aa276781a64a5f Nishanth Menon 2016-10-18  3560  

:::::: The code at line 3520 was first introduced by commit
:::::: aa276781a64a5f15ecc21e920960c5b1f84e5fee firmware: Add basic support for TI System Control Interface (TI-SCI) protocol

:::::: TO: Nishanth Menon <nm@ti.com>
:::::: CC: Tero Kristo <t-kristo@ti.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Lee Jones April 24, 2020, 10:05 a.m. UTC | #3
On Mon, 20 Apr 2020, Hadar Gat wrote:

> Both of_platform.h and of_device.h were included each other.
> In of_device.h, removed unneeded #include to of_platform.h
> and added include to of_platform.h in the files that needs it.
> 
> Signed-off-by: Hadar Gat <hadar.gat@arm.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
> Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
> ---
> v3: add include to of_platform.h in more files. (reported due other builds)
> v2: add include to of_platform.h in more files. (reported due other builds)
> 
>  arch/sparc/kernel/pci.c                           | 1 +
>  arch/sparc/kernel/pci_sabre.c                     | 1 +
>  arch/sparc/kernel/pci_schizo.c                    | 1 +
>  arch/sparc/kernel/sbus.c                          | 1 +
>  arch/sparc/mm/io-unit.c                           | 1 +
>  arch/sparc/mm/iommu.c                             | 1 +
>  drivers/base/platform.c                           | 1 +
>  drivers/bus/imx-weim.c                            | 1 +
>  drivers/bus/vexpress-config.c                     | 1 +
>  drivers/clk/mediatek/clk-mt7622-aud.c             | 1 +
>  drivers/dma/at_hdmac.c                            | 1 +
>  drivers/dma/stm32-dmamux.c                        | 1 +
>  drivers/dma/ti/dma-crossbar.c                     | 1 +
>  drivers/gpu/drm/msm/adreno/a6xx_gmu.c             | 1 +
>  drivers/gpu/drm/msm/hdmi/hdmi.c                   | 1 +
>  drivers/gpu/drm/msm/msm_drv.c                     | 1 +
>  drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   | 1 +
>  drivers/gpu/drm/sun4i/sun4i_tcon.c                | 1 +
>  drivers/iio/adc/stm32-adc-core.c                  | 1 +
>  drivers/iio/adc/stm32-dfsdm-adc.c                 | 1 +
>  drivers/iio/adc/stm32-dfsdm-core.c                | 1 +
>  drivers/iommu/tegra-smmu.c                        | 1 +
>  drivers/media/platform/coda/coda-common.c         | 1 +
>  drivers/memory/atmel-ebi.c                        | 1 +

>  drivers/mfd/palmas.c                              | 1 +
>  drivers/mfd/ssbi.c                                | 1 +

Acked-by: Lee Jones <lee.jones@linaro.org>

>  drivers/mtd/nand/raw/omap2.c                      | 1 +
>  drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
>  drivers/net/ethernet/ti/cpsw.c                    | 1 +
>  drivers/phy/tegra/xusb.c                          | 1 +
>  drivers/pinctrl/freescale/pinctrl-imx1-core.c     | 1 +
>  drivers/pinctrl/nomadik/pinctrl-nomadik.c         | 1 +
>  drivers/soc/samsung/exynos-pmu.c                  | 1 +
>  drivers/soc/sunxi/sunxi_sram.c                    | 1 +
>  include/linux/of_device.h                         | 2 --
>  lib/genalloc.c                                    | 1 +
>  36 files changed, 35 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 5ed4382..89ea658 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -21,6 +21,7 @@ 
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <linux/uaccess.h>
 #include <asm/pgtable.h>
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
index 3c38ca4..16761d0 100644
--- a/arch/sparc/kernel/pci_sabre.c
+++ b/arch/sparc/kernel/pci_sabre.c
@@ -14,6 +14,7 @@ 
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/apb.h>
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 421aba0..733f069 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -12,6 +12,7 @@ 
 #include <linux/export.h>
 #include <linux/interrupt.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/numa.h>
 
 #include <asm/iommu.h>
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c
index 32141e1..2f4051f 100644
--- a/arch/sparc/kernel/sbus.c
+++ b/arch/sparc/kernel/sbus.c
@@ -15,6 +15,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/numa.h>
 
 #include <asm/page.h>
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
index 289276b..5638399 100644
--- a/arch/sparc/mm/io-unit.c
+++ b/arch/sparc/mm/io-unit.c
@@ -15,6 +15,7 @@ 
 #include <linux/dma-mapping.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index b00dde1..9cbb2e7 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -16,6 +16,7 @@ 
 #include <linux/dma-mapping.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 5255550..f549274b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -12,6 +12,7 @@ 
 #include <linux/string.h>
 #include <linux/platform_device.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_irq.h>
 #include <linux/module.h>
 #include <linux/init.h>
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 28bb65a..8c786da 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -11,6 +11,7 @@ 
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <linux/regmap.h>
diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index ff70575..12b8b0b 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -8,6 +8,7 @@ 
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/vexpress.h>
 
 
diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
index 2bd4295..8cbb68f 100644
--- a/drivers/clk/mediatek/clk-mt7622-aud.c
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
@@ -9,6 +9,7 @@ 
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 
 #include "clk-mtk.h"
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 73a2078..388f8e10 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -20,6 +20,7 @@ 
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_dma.h>
 
 #include "at_hdmac_regs.h"
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index 12f7637..b704896 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -16,6 +16,7 @@ 
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_dma.h>
 #include <linux/pm_runtime.h>
 #include <linux/reset.h>
diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c
index 4ba8fa5..2c0fd44 100644
--- a/drivers/dma/ti/dma-crossbar.c
+++ b/drivers/dma/ti/dma-crossbar.c
@@ -10,6 +10,7 @@ 
 #include <linux/io.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_dma.h>
 
 #define TI_XBAR_DRA7		0
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index c4e71ab..f523254 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -6,6 +6,7 @@ 
 #include <linux/interconnect.h>
 #include <linux/pm_domain.h>
 #include <linux/pm_opp.h>
+#include <linux/of_platform.h>
 #include <soc/qcom/cmd-db.h>
 
 #include "a6xx_gpu.h"
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index 737453b..5034d40 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -7,6 +7,7 @@ 
 
 #include <linux/of_irq.h>
 #include <linux/of_gpio.h>
+#include <linux/of_platform.h>
 
 #include <sound/hdmi-codec.h>
 #include "hdmi.h"
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 29295de..ddc9e85 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -8,6 +8,7 @@ 
 #include <linux/dma-mapping.h>
 #include <linux/kthread.h>
 #include <linux/uaccess.h>
+#include <linux/of_platform.h>
 #include <uapi/linux/sched/types.h>
 
 #include <drm/drm_drv.h>
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 6e1270e..d038bae 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -12,6 +12,7 @@ 
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 624437b..aa35757 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -11,6 +11,7 @@ 
 #include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
index 2df88d2..3dc3453 100644
--- a/drivers/iio/adc/stm32-adc-core.c
+++ b/drivers/iio/adc/stm32-adc-core.c
@@ -17,6 +17,7 @@ 
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c
index 76a60d9..e83848cb 100644
--- a/drivers/iio/adc/stm32-dfsdm-adc.c
+++ b/drivers/iio/adc/stm32-dfsdm-adc.c
@@ -20,6 +20,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
index 26e2011..f6a53ab 100644
--- a/drivers/iio/adc/stm32-dfsdm-core.c
+++ b/drivers/iio/adc/stm32-dfsdm-core.c
@@ -12,6 +12,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/pm_runtime.h>
 #include <linux/regmap.h>
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 63a147b..3797caa 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -10,6 +10,7 @@ 
 #include <linux/kernel.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/dma-mapping.h>
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index d0d093d..0874824 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -20,6 +20,7 @@ 
 #include <linux/kfifo.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 14386d0..272b1a8 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -13,6 +13,7 @@ 
 #include <linux/mfd/syscon/atmel-smc.h>
 #include <linux/init.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/regmap.h>
 #include <soc/at91/atmel-sfr.h>
 
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index f5b3fa9..cca44bc 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -19,6 +19,7 @@ 
 #include <linux/mfd/core.h>
 #include <linux/mfd/palmas.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = {
 	{
diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
index 94f60df..72cd45a 100644
--- a/drivers/mfd/ssbi.c
+++ b/drivers/mfd/ssbi.c
@@ -20,6 +20,7 @@ 
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 /* SSBI 2.0 controller registers */
 #define SSBI2_CMD			0x0008
diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c
index ad77c11..d851ec7 100644
--- a/drivers/mtd/nand/raw/omap2.c
+++ b/drivers/mtd/nand/raw/omap2.c
@@ -22,6 +22,7 @@ 
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 
 #include <linux/mtd/nand_bch.h>
 #include <linux/platform_data/elm.h>
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 58e0511..d704d57 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -12,6 +12,7 @@ 
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_mdio.h>
 #include <linux/of_net.h>
 #include <linux/phy.h>
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c2c5bf8..6932945 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -28,6 +28,7 @@ 
 #include <linux/of_mdio.h>
 #include <linux/of_net.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/if_vlan.h>
 #include <linux/kmemleak.h>
 #include <linux/sys_soc.h>
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index de4a46f..0eac1b8 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -9,6 +9,7 @@ 
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/phy/tegra/xusb.h>
 #include <linux/platform_device.h>
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index c00d002..d1c171e 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -16,6 +16,7 @@ 
 #include <linux/io.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/pinctrl/pinconf.h>
 #include <linux/pinctrl/pinctrl.h>
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index ca7bbe4..44974ac 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -19,6 +19,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/bitops.h>
 #include <linux/pinctrl/machine.h>
diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c
index 17304fa..25129b0 100644
--- a/drivers/soc/samsung/exynos-pmu.c
+++ b/drivers/soc/samsung/exynos-pmu.c
@@ -8,6 +8,7 @@ 
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/mfd/syscon.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 1b0d50f..423cec3 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -16,6 +16,7 @@ 
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index 8d31e39..752999b 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -4,8 +4,6 @@ 
 
 #include <linux/cpu.h>
 #include <linux/platform_device.h>
-#include <linux/of_platform.h> /* temporary until merge */
-
 #include <linux/of.h>
 #include <linux/mod_devicetable.h>
 
diff --git a/lib/genalloc.c b/lib/genalloc.c
index 7f1244b..08e21eeb 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -33,6 +33,7 @@ 
 #include <linux/interrupt.h>
 #include <linux/genalloc.h>
 #include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/vmalloc.h>
 
 static inline size_t chunk_size(const struct gen_pool_chunk *chunk)