diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-10-05 13:18:10 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-10-06 11:57:52 -0400 |
commit | ab96b03144c5392b8c0c427cc37df34daa84c5d0 (patch) | |
tree | 438c8ec0b7e8b2830ff7a08dd8a5717f46953426 | |
parent | f474ba9d9f275fc3bfe459b48bfc17ddd8e1f4cb (diff) |
MIPS: PCI: Inline pcibios_assign_all_busses
The MIPS implementation of pcibios_assign_all_busses trivially returns
1. Implement it as a static function in asm/pci.h such that the compiler
can inline it & optimise out never-taken paths.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14343/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/pci.h | 6 | ||||
-rw-r--r-- | arch/mips/pci/pci.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 0564692c7d3b..acc651ec5014 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h | |||
@@ -66,8 +66,10 @@ extern int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | |||
66 | /* Can be used to override the logic in pci_scan_bus for skipping | 66 | /* Can be used to override the logic in pci_scan_bus for skipping |
67 | already-configured bus numbers - to be used for buggy BIOSes | 67 | already-configured bus numbers - to be used for buggy BIOSes |
68 | or architectures with incomplete PCI setup by the loader */ | 68 | or architectures with incomplete PCI setup by the loader */ |
69 | 69 | static inline unsigned int pcibios_assign_all_busses(void) | |
70 | extern unsigned int pcibios_assign_all_busses(void); | 70 | { |
71 | return 1; | ||
72 | } | ||
71 | 73 | ||
72 | extern unsigned long PCIBIOS_MIN_IO; | 74 | extern unsigned long PCIBIOS_MIN_IO; |
73 | extern unsigned long PCIBIOS_MIN_MEM; | 75 | extern unsigned long PCIBIOS_MIN_MEM; |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 30320a4c8909..8cc6ea4e9481 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -297,11 +297,6 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
297 | return 0; | 297 | return 0; |
298 | } | 298 | } |
299 | 299 | ||
300 | unsigned int pcibios_assign_all_busses(void) | ||
301 | { | ||
302 | return 1; | ||
303 | } | ||
304 | |||
305 | int pcibios_enable_device(struct pci_dev *dev, int mask) | 300 | int pcibios_enable_device(struct pci_dev *dev, int mask) |
306 | { | 301 | { |
307 | int err; | 302 | int err; |