From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH] of_device: removed #include that caused a recursion in included headers Date: Mon, 20 Apr 2020 15:36:47 -0500 Message-ID: <20200420203647.GA23189@bogus> References: <1586784960-22692-1-git-send-email-hadar.gat@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1586784960-22692-1-git-send-email-hadar.gat-5wv7dgnIgG8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: freedreno-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Freedreno" To: Hadar Gat Cc: Jose Abreu , Alexandre Belloni , =?UTF-8?Q?Heiko_St=C3=BCbner?= , David Airlie , Linus Walleij , Liviu Dudau , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Sandy Huang , Thierry Reding , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Miquel Raynal , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Kishon Vijay Abraham I , Lee Jones , linux-stm32-XDFAJ8BFU24N7RejjzZ/Li2xQDfSxrLKVpNB7YpNyf8@public.gmane.org, Vignesh Raghavendra , linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Lorenzo Pieralisi , Frank Rowand , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Richard Weinberger , Joerg Roedel , Vinod Koul , Krzysztof List-Id: linux-tegra@vger.kernel.org On Mon, Apr 13, 2020 at 04:35:53PM +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. Guess we forgot about that temporary comment! Both of these headers have a lot of things we don't want 'normal' drivers calling. The most common thing needed from of_device.h is of_match_device/of_device_get_match_data. A good number are only for ibmebus. Maybe the header should be split or the former just moved to of.h. For of_platform.h, it seems we have a bunch of unneeded includes: $ git grep 'of_platform\.h' drivers/ | wc 560 1120 36049 $ git grep -E 'of_(platform_(pop|def)|find_device)' drivers/ | wc 248 1215 20630 Would nice to drop those (or switch to of_device.h?) too. Be sure to build on Sparc. It's the oddball. > > Signed-off-by: Hadar Gat > --- > drivers/base/platform.c | 1 + > drivers/bus/vexpress-config.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/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/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 + > 26 files changed, 25 insertions(+), 2 deletions(-)