RE: [PATCH] net: Explicitly include correct DT includes

Wei Fang
2023-07-17T01:47:10Z

> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: 2023年7月15日 1:48
> To: Dario Binacchi <dario.binacchi@amarulasolutions.com>; Wolfgang
> Grandegger <wg@grandegger.com>; Marc Kleine-Budde
> <mkl@pengutronix.de>; David S. Miller <davem@davemloft.net>; Eric
> Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
> Abeni <pabeni@redhat.com>; Chandrasekar Ramakrishnan
> <rcsekar@samsung.com>; Chen-Yu Tsai <wens@csie.org>; Jernej Skrabec
> <jernej.skrabec@gmail.com>; Samuel Holland <samuel@sholland.org>; Florian
> Fainelli <florian.fainelli@broadcom.com>; Andrew Lunn <andrew@lunn.ch>;
> Vladimir Oltean <olteanv@gmail.com>; Kurt Kanzenbach <kurt@linutronix.de>;
> Woojung Huh <woojung.huh@microchip.com>;
> UNGLinuxDriver@microchip.com; Arınç ÜNAL <arinc.unal@arinc9.com>;
> Daniel Golle <daniel@makrotopia.org>; Landen Chao
> <Landen.Chao@mediatek.com>; DENG Qingfang <dqfext@gmail.com>; Sean
> Wang <sean.wang@mediatek.com>; Matthias Brugger
> <matthias.bgg@gmail.com>; AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com>; Claudiu Manoil
> <claudiu.manoil@nxp.com>; Alexandre Belloni
> <alexandre.belloni@bootlin.com>; Linus Walleij <linus.walleij@linaro.org>;
> Alvin Šipraga <alsi@bang-olufsen.dk>; George McCollister
> <george.mccollister@gmail.com>; Andreas Larsson <andreas@gaisler.com>;
> Iyappan Subramanian <iyappan@os.amperecomputing.com>; Keyur Chudgar
> <keyur@os.amperecomputing.com>; Chris Snook <chris.snook@gmail.com>;
> Nicolas Ferre <nicolas.ferre@microchip.com>; Claudiu Beznea
> <claudiu.beznea@microchip.com>; Madalin Bucur <madalin.bucur@nxp.com>;
> Wei Fang <wei.fang@nxp.com>; Shenwei Wang <shenwei.wang@nxp.com>;
> Clark Wang <xiaoning.wang@nxp.com>; dl-linux-imx <linux-imx@nxp.com>;
> Sean Anderson <sean.anderson@seco.com>; Pantelis Antoniou
> <pantelis.antoniou@gmail.com>; Leo Li <leoyang.li@nxp.com>; Yisen Zhuang
> <yisen.zhuang@huawei.com>; Salil Mehta <salil.mehta@huawei.com>;
> Douglas Miller <dougmill@linux.ibm.com>; Marcin Wojtas
> <mw@semihalf.com>; Russell King <linux@armlinux.org.uk>; Tara s Chornyi
> <taras.chornyi@plvision.eu>; Mirko Lindner <mlindner@marvell.com>;
> Stephen Hemminger <stephen@networkplumber.org>; Felix Fietkau
> <nbd@nbd.name>; John Crispin <john@phrozen.org>; Mark Lee
> <Mark-MC.Lee@mediatek.com>; Lorenzo Bianconi <lorenzo@kernel.org>;
> Horatiu Vultur <horatiu.vultur@microchip.com>; Timur Tabi
> <timur@kernel.org>; Sergey Shtylyov <s.shtylyov@omp.ru>; Steve Glendinning
> <steve.glendinning@shawell.net>; Kunihiko Hayashi
> <hayashi.kunihiko@socionext.com>; Giuseppe Cavallaro
> <peppe.cavallaro@st.com>; Alexandre Torgue <alexandre.torgue@foss.st.com>;
> Jose Abreu <joabreu@synopsys.com>; Maxime Coquelin
> <mcoquelin.stm32@gmail.com>; Shawn Guo <shawnguo@kernel.org>; Sascha
> Hauer <s.hauer@pengutronix.de>; Pengutronix Kernel Team
> <kernel@pengutronix.de>; Fabio Estevam <festevam@gmail.com>; Neil
> Armstrong <neil.armstrong@linaro.org>; Kevin Hilman
> <khilman@baylibre.com>; Jerome Brunet <jbrunet@baylibre.com>; Martin
> Blumenstingl <martin.blumenstingl@googlemail.com>; Vinod Ko ul
> <vkoul@kernel.org>; Bhupesh Sharma <bhupesh.sharma@linaro.org>; Emil
> Renner Berthing <kernel@esmil.dk>; Samin Guo
> <samin.guo@starfivetech.com>; Thierry Reding <thierry.reding@gmail.com>;
> Jonathan Hunter <jonathanh@nvidia.com>; Nobuhiro Iwamatsu
> <nobuhiro1.iwamatsu@toshiba.co.jp>; Grygorii Strashko
> <grygorii.strashko@ti.com>; Kevin Brace
> <kevinbrace@bracecomputerlab.com>; Francois Romieu
> <romieu@fr.zoreil.com>; Michal Simek <michal.simek@amd.com>; Radhey
> Shyam Pandey <radhey.shyam.pandey@amd.com>; Alexander Aring
> <alex.aring@gmail.com>; Stefan Schmidt <stefan@datenfreihafen.org>;
> Miquel Raynal <miquel.raynal@bootlin.com>; Alex Elder <elder@kernel.org>;
> Clément Léger <clement.leger@bootlin.com>; Heiner Kallweit
> <hkallweit1@gmail.com>; SkyLake Huang <SkyLake.Huang@mediatek.com>;
> Kalle Valo <kvalo@kernel.org>; Loic Poulain <loic.poulain@linaro.org>; Ryder
> Lee <ryder.lee@mediatek.com>; Shayne Chen <shayne.chen@mediatek.com>;
> Jérôme Pouille r <jerome.pouiller@silabs.com>; Richard Cochran
> <richardcochran@gmail.com>
> Cc: devicetree@vger.kernel.org; linux-can@vger.kernel.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-sunxi@lists.linux.dev;
> linux-mediatek@lists.infradead.org; linuxppc-dev@lists.ozlabs.org;
> linux-renesas-soc@vger.kernel.org;
> linux-stm32@st-md-mailman.stormreply.com;
> linux-amlogic@lists.infradead.org; linux-oxnas@groups.io;
> linux-tegra@vger.kernel.org; linux-omap@vger.kernel.org;
> linux-wpan@vger.kernel.org; ath10k@lists.infradead.org;
> linux-wireless@vger.kernel.org; ath11k@lists.infradead.org;
> wcn36xx@lists.infradead.org
> Subject: [PATCH] net: 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.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c
> b/drivers/net/ethernet/freescale/fec_ptp.c
> index ab86bb8562ef..9428a06b6a87 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -30,7 +30,6 @@
> #include <linux/phy.h>
> #include <linux/fec.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/of_gpio.h>
> #include <linux/of_net.h>
>
Thanks!
Reviewed-by: Wei Fang <wei.fang@nxp.com>