Re: [PATCH] usb: Explicitly include correct DT includes

2023-07-18 Thread Herve Codina
Hi Rob,

On Fri, 14 Jul 2023 11:50:23 -0600
Rob Herring  wrote:

> 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 
> ---

[...]

> diff --git a/drivers/usb/gadget/udc/renesas_usbf.c 
> b/drivers/usb/gadget/udc/renesas_usbf.c
> index 6cd0af83e91e..3482b41d0646 100644
> --- a/drivers/usb/gadget/udc/renesas_usbf.c
> +++ b/drivers/usb/gadget/udc/renesas_usbf.c
> @@ -12,10 +12,9 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
> -#include 
> -#include 
> -#include 
> +#include 
>  #include 
>  #include 
>  #include 

Acked-by: Herve Codina 

Best regards,
Hervé


Re: [PATCH] usb: Explicitly include correct DT includes

2023-07-17 Thread Rob Herring
On Fri, Jul 14, 2023 at 11:50 AM Rob Herring  wrote:
>
> 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 
> ---

[...]

> diff --git a/drivers/usb/host/fsl-mph-dr-of.c 
> b/drivers/usb/host/fsl-mph-dr-of.c
> index a9877f2569f4..2574bccc151b 100644
> --- a/drivers/usb/host/fsl-mph-dr-of.c
> +++ b/drivers/usb/host/fsl-mph-dr-of.c
> @@ -10,10 +10,12 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
> +#include 
>  #include 
>  #include 
>  #include 
> +#include 

Double include of of.h here. v2 coming.

Rob


[PATCH] usb: Explicitly include correct DT includes

2023-07-14 Thread Rob Herring
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 
---
 drivers/usb/cdns3/cdns3-gadget.c| 1 +
 drivers/usb/cdns3/cdns3-plat.c  | 1 +
 drivers/usb/cdns3/cdns3-ti.c| 1 +
 drivers/usb/cdns3/core.c| 1 +
 drivers/usb/chipidea/ci_hdrc_imx.c  | 1 +
 drivers/usb/chipidea/ci_hdrc_tegra.c| 3 ++-
 drivers/usb/chipidea/usbmisc_imx.c  | 3 ++-
 drivers/usb/common/common.c | 1 +
 drivers/usb/core/message.c  | 1 +
 drivers/usb/core/of.c   | 1 -
 drivers/usb/core/usb.c  | 1 +
 drivers/usb/dwc2/gadget.c   | 1 -
 drivers/usb/dwc2/platform.c | 2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c  | 1 +
 drivers/usb/dwc3/dwc3-keystone.c| 1 +
 drivers/usb/gadget/udc/fsl_udc_core.c   | 1 -
 drivers/usb/gadget/udc/gr_udc.c | 5 ++---
 drivers/usb/gadget/udc/max3420_udc.c| 4 +---
 drivers/usb/gadget/udc/pxa27x_udc.c | 2 +-
 drivers/usb/gadget/udc/renesas_usb3.c   | 2 +-
 drivers/usb/gadget/udc/renesas_usbf.c   | 5 ++---
 drivers/usb/gadget/udc/tegra-xudc.c | 1 -
 drivers/usb/gadget/udc/udc-xilinx.c | 6 ++
 drivers/usb/host/ehci-fsl.c | 2 +-
 drivers/usb/host/ehci-orion.c   | 2 --
 drivers/usb/host/fhci-hcd.c | 3 ++-
 drivers/usb/host/fsl-mph-dr-of.c| 4 +++-
 drivers/usb/host/ohci-at91.c| 2 +-
 drivers/usb/host/ohci-da8xx.c   | 1 +
 drivers/usb/host/ohci-ppc-of.c  | 3 ++-
 drivers/usb/host/xhci-plat.c| 1 -
 drivers/usb/host/xhci-rcar.c| 1 -
 drivers/usb/host/xhci-tegra.c   | 2 +-
 drivers/usb/misc/usb251xb.c | 2 +-
 drivers/usb/mtu3/mtu3.h | 1 +
 drivers/usb/mtu3/mtu3_host.c| 1 +
 drivers/usb/musb/jz4740.c   | 2 +-
 drivers/usb/musb/mediatek.c | 1 +
 drivers/usb/musb/mpfs.c | 1 +
 drivers/usb/musb/musb_dsps.c| 2 --
 drivers/usb/musb/sunxi.c| 1 -
 drivers/usb/phy/phy-mxs-usb.c   | 2 +-
 drivers/usb/phy/phy-tegra-usb.c | 2 +-
 drivers/usb/renesas_usbhs/common.c  | 2 +-
 drivers/usb/renesas_usbhs/rza.c | 2 +-
 drivers/usb/renesas_usbhs/rza2.c| 1 -
 drivers/usb/typec/tcpm/fusb302.c| 2 +-
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c   | 2 +-
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 --
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c  | 1 -
 drivers/usb/typec/ucsi/ucsi_glink.c | 1 -
 51 files changed, 47 insertions(+), 48 deletions(-)

diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index ea19253fd2d0..e6f6aeb7b5bb 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "core.h"
 #include "gadget-export.h"
diff --git a/drivers/usb/cdns3/cdns3-plat.c b/drivers/usb/cdns3/cdns3-plat.c
index 884e2301237f..b15ff5bd91c2 100644
--- a/drivers/usb/cdns3/cdns3-plat.c
+++ b/drivers/usb/cdns3/cdns3-plat.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 81b9132e3aaa..5945c4b1e11f 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /* USB Wrapper register offsets */
 #define USBSS_PID  0x0
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index dbcdf3b24b47..baa154cee352 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c 
b/drivers/usb/chipidea/ci_hdrc_imx.c
index 336ef6dd8e7d..aa2aebed8e2d 100644
---