mbox series

[v3,0/5] PCI: Remove unnecessary <linux/of_irq.h> includes

Message ID 20221031153954.1163623-1-helgaas@kernel.org
Headers show
Series PCI: Remove unnecessary <linux/of_irq.h> includes | expand

Message

Bjorn Helgaas Oct. 31, 2022, 3:39 p.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

Many host controller drivers #include <linux/of_irq.h> even though they
don't need it.  Remove the unnecessary #includes.

v2: https://lore.kernel.org/r/20221025185147.665365-1-helgaas@kernel.org/
v1: https://lore.kernel.org/r/20221019195452.37606-1-helgaas@kernel.org/

Changes from v2 to v3:
  - Include <linux/irqdomain.h> explicitly in xgene-msi, which doesn't need
    <linux/of_irq.h> itself, but relied on it to include
    <linux/irqdomain.h>.  On x86, this was covered up by the fact that
    <linux/msi.h> includes <asm/msi.h>, which includes <asm/irqdomain.h>,
    which includes <linux/irqdomain.h>.  But on parisc, <asm/msi.h> is
    actually asm-generic/msi.h, which does *not* include
    <linux/irqdomain.h>
  - Pick up tags from Conor Dooley and Thomas Petazzoni

Changes from v1 to v2:
  - Include <linux/irqdomain.h> explicitly in altera-msi and microchip,
    which don't need <linux/of_irq.h> itself, but relied on it to include
    <linux/irqdomain.h>
  - Include <linux/irqdomain.h> explicitly in mvebu, which needs both it
    and <linux/of_irq.h>

Bjorn Helgaas (5):
  PCI: altera-msi: Include <linux/irqdomain.h> explicitly
  PCI: microchip: Include <linux/irqdomain.h> explicitly
  PCI: mvebu: Include <linux/irqdomain.h> explicitly
  PCI: xgene-msi: Include <linux/irqdomain.h> explicitly
  PCI: Remove unnecessary <linux/of_irq.h> includes

 drivers/pci/controller/cadence/pci-j721e.c   | 1 -
 drivers/pci/controller/dwc/pci-layerscape.c  | 1 -
 drivers/pci/controller/dwc/pcie-armada8k.c   | 1 -
 drivers/pci/controller/dwc/pcie-tegra194.c   | 1 -
 drivers/pci/controller/pci-mvebu.c           | 1 +
 drivers/pci/controller/pci-v3-semi.c         | 1 -
 drivers/pci/controller/pci-xgene-msi.c       | 2 +-
 drivers/pci/controller/pci-xgene.c           | 1 -
 drivers/pci/controller/pcie-altera-msi.c     | 2 +-
 drivers/pci/controller/pcie-iproc-platform.c | 1 -
 drivers/pci/controller/pcie-iproc.c          | 1 -
 drivers/pci/controller/pcie-microchip-host.c | 2 +-
 drivers/pci/controller/pcie-rockchip-host.c  | 1 -
 drivers/pci/controller/pcie-xilinx-cpm.c     | 1 -
 drivers/pci/controller/pcie-xilinx-nwl.c     | 1 -
 15 files changed, 4 insertions(+), 14 deletions(-)

Comments

Roy Zang Oct. 31, 2022, 4:58 p.m. UTC | #1
> -----Original Message-----
> From: Bjorn Helgaas <helgaas@kernel.org>
> Subject: [PATCH v3 5/5] PCI: Remove unnecessary <linux/of_irq.h> includes
> 
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Many host controller drivers #include <linux/of_irq.h> even though they
> don't need it.  Remove the unnecessary #includes.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
>  drivers/pci/controller/cadence/pci-j721e.c   | 1 -
>  drivers/pci/controller/dwc/pci-layerscape.c  | 1 -
>  drivers/pci/controller/dwc/pcie-armada8k.c   | 1 -
>  drivers/pci/controller/dwc/pcie-tegra194.c   | 1 -
>  drivers/pci/controller/pci-v3-semi.c         | 1 -
>  drivers/pci/controller/pci-xgene-msi.c       | 1 -
>  drivers/pci/controller/pci-xgene.c           | 1 -
>  drivers/pci/controller/pcie-altera-msi.c     | 1 -
>  drivers/pci/controller/pcie-iproc-platform.c | 1 -
>  drivers/pci/controller/pcie-iproc.c          | 1 -
>  drivers/pci/controller/pcie-microchip-host.c | 1 -  drivers/pci/controller/pcie-
> rockchip-host.c  | 1 -
>  drivers/pci/controller/pcie-xilinx-cpm.c     | 1 -
>  drivers/pci/controller/pcie-xilinx-nwl.c     | 1 -
>  14 files changed, 14 deletions(-)
Acked-by: Roy Zang <roy.zang@nxp.com>

-R
Bjorn Helgaas Nov. 10, 2022, 9:02 p.m. UTC | #2
On Mon, Oct 31, 2022 at 10:39:49AM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Many host controller drivers #include <linux/of_irq.h> even though they
> don't need it.  Remove the unnecessary #includes.
> 
> v2: https://lore.kernel.org/r/20221025185147.665365-1-helgaas@kernel.org/
> v1: https://lore.kernel.org/r/20221019195452.37606-1-helgaas@kernel.org/
> 
> Changes from v2 to v3:
>   - Include <linux/irqdomain.h> explicitly in xgene-msi, which doesn't need
>     <linux/of_irq.h> itself, but relied on it to include
>     <linux/irqdomain.h>.  On x86, this was covered up by the fact that
>     <linux/msi.h> includes <asm/msi.h>, which includes <asm/irqdomain.h>,
>     which includes <linux/irqdomain.h>.  But on parisc, <asm/msi.h> is
>     actually asm-generic/msi.h, which does *not* include
>     <linux/irqdomain.h>
>   - Pick up tags from Conor Dooley and Thomas Petazzoni
> 
> Changes from v1 to v2:
>   - Include <linux/irqdomain.h> explicitly in altera-msi and microchip,
>     which don't need <linux/of_irq.h> itself, but relied on it to include
>     <linux/irqdomain.h>
>   - Include <linux/irqdomain.h> explicitly in mvebu, which needs both it
>     and <linux/of_irq.h>
> 
> Bjorn Helgaas (5):
>   PCI: altera-msi: Include <linux/irqdomain.h> explicitly
>   PCI: microchip: Include <linux/irqdomain.h> explicitly
>   PCI: mvebu: Include <linux/irqdomain.h> explicitly
>   PCI: xgene-msi: Include <linux/irqdomain.h> explicitly
>   PCI: Remove unnecessary <linux/of_irq.h> includes
> 
>  drivers/pci/controller/cadence/pci-j721e.c   | 1 -
>  drivers/pci/controller/dwc/pci-layerscape.c  | 1 -
>  drivers/pci/controller/dwc/pcie-armada8k.c   | 1 -
>  drivers/pci/controller/dwc/pcie-tegra194.c   | 1 -
>  drivers/pci/controller/pci-mvebu.c           | 1 +
>  drivers/pci/controller/pci-v3-semi.c         | 1 -
>  drivers/pci/controller/pci-xgene-msi.c       | 2 +-
>  drivers/pci/controller/pci-xgene.c           | 1 -
>  drivers/pci/controller/pcie-altera-msi.c     | 2 +-
>  drivers/pci/controller/pcie-iproc-platform.c | 1 -
>  drivers/pci/controller/pcie-iproc.c          | 1 -
>  drivers/pci/controller/pcie-microchip-host.c | 2 +-
>  drivers/pci/controller/pcie-rockchip-host.c  | 1 -
>  drivers/pci/controller/pcie-xilinx-cpm.c     | 1 -
>  drivers/pci/controller/pcie-xilinx-nwl.c     | 1 -
>  15 files changed, 4 insertions(+), 14 deletions(-)

I put these on a pci/kbuild branch that I propose to merge in after
everything else.  Lorenzo, let me know if you prefer another approach.

Bjorn
Rob Herring (Arm) Nov. 11, 2022, 6:27 p.m. UTC | #3
On Mon, Oct 31, 2022 at 10:40 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> Many host controller drivers #include <linux/of_irq.h> even though they
> don't need it.  Remove the unnecessary #includes.

Note that the same is often true of the other of_*.h headers.

of_device.h and of_platform.h are tricky though as one includes the
other (with a decade old comment to fix). I started down that rabbit
hole once...

Rob