Skip to content

Commit

Permalink
PCI: Remove redundant pci_dev, pci_bus, resource declarations
Browse files Browse the repository at this point in the history
<linux/pci.h> defines struct pci_bus and struct pci_dev and includes the
struct resource definition before including <asm/pci.h>.  Nobody includes
<asm/pci.h> directly, so they don't need their own declarations.

Remove the redundant struct pci_dev, pci_bus, resource declarations.

Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Ingo Molnar <[email protected]>
Acked-by: Jesper Nilsson <[email protected]>	# CRIS
Acked-by: Ralf Baechle <[email protected]>		# MIPS
  • Loading branch information
bjorn-helgaas committed Nov 8, 2017
1 parent 137ed9f commit be2d877
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 28 deletions.
3 changes: 0 additions & 3 deletions arch/alpha/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
* The following structure is used to manage multiple PCI busses.
*/

struct pci_dev;
struct pci_bus;
struct resource;
struct pci_iommu_arena;
struct page;

Expand Down
2 changes: 0 additions & 2 deletions arch/cris/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
#include <linux/string.h>
#include <asm/io.h>

struct pci_dev;

/* The PCI address space does equal the physical memory
* address space. The networking and block device layers use
* this boolean for bounce buffer decisions.
Expand Down
2 changes: 0 additions & 2 deletions arch/frv/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <linux/scatterlist.h>
#include <asm-generic/pci.h>

struct pci_dev;

#define pcibios_assign_all_busses() 0

#ifdef CONFIG_MMU
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ struct pci_vector_struct {

void pcibios_config_init(void);

struct pci_dev;

/*
* PCI_DMA_BUS_IS_PHYS should be set to 1 if there is _necessarily_ a direct
* correspondence between device bus addresses and CPU physical addresses.
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ extern unsigned long PCIBIOS_MIN_MEM;
#include <linux/string.h>
#include <asm/io.h>

struct pci_dev;

/*
* The PCI address space does equal the physical memory address space.
* The networking and block device layers use this boolean for bounce
Expand Down
2 changes: 0 additions & 2 deletions arch/mn10300/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ extern void unit_pci_init(void);
#include <linux/string.h>
#include <asm/io.h>

struct pci_dev;

/* The PCI address space does equal the physical memory
* address space. The networking and block device layers use
* this boolean for bounce buffer decisions.
Expand Down
7 changes: 0 additions & 7 deletions arch/parisc/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ struct pci_hba_data {
#define PCI_F_EXTEND 0UL
#endif /* !CONFIG_64BIT */

/*
** KLUGE: linux/pci.h include asm/pci.h BEFORE declaring struct pci_bus
** (This eliminates some of the warnings).
*/
struct pci_bus;
struct pci_dev;

/*
* If the PCI device's view of memory is the same as the CPU's view of memory,
* PCI_DMA_BUS_IS_PHYS is true. The networking and block device layers use
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0x10000000

struct pci_dev;

/* Values for the `which' argument to sys_pciconfig_iobase syscall. */
#define IOBASE_BRIDGE_NUMBER 0
#define IOBASE_MEMORY 1
Expand Down
2 changes: 0 additions & 2 deletions arch/sh/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ extern int pci_is_66mhz_capable(struct pci_channel *hose,

extern unsigned long PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM;

struct pci_dev;

#define HAVE_PCI_MMAP
#define ARCH_GENERIC_PCI_MMAP_RESOURCE

Expand Down
2 changes: 0 additions & 2 deletions arch/sparc/include/asm/pci_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
*/
#define PCI_DMA_BUS_IS_PHYS (0)

struct pci_dev;

#endif /* __KERNEL__ */

#ifndef CONFIG_LEON_PCI
Expand Down
2 changes: 0 additions & 2 deletions arch/xtensa/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ extern struct pci_controller* pcibios_alloc_controller(void);
#include <linux/string.h>
#include <asm/io.h>

struct pci_dev;

/* The PCI address space does equal the physical memory address space.
* The networking and block device layers use this boolean for bounce buffer
* decisions.
Expand Down

0 comments on commit be2d877

Please sign in to comment.