]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: PCI: Inline pcibios_assign_all_busses
authorPaul Burton <paul.burton@imgtec.com>
Wed, 5 Oct 2016 17:18:10 +0000 (18:18 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Oct 2016 15:57:52 +0000 (17:57 +0200)
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>
arch/mips/include/asm/pci.h
arch/mips/pci/pci.c

index 0564692c7d3bcbd1411c7e3cdc57d2d466b75704..acc651ec501432923655607b0835585af30934e4 100644 (file)
@@ -66,8 +66,10 @@ extern int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
 /* Can be used to override the logic in pci_scan_bus for skipping
    already-configured bus numbers - to be used for buggy BIOSes
    or architectures with incomplete PCI setup by the loader */
-
-extern unsigned int pcibios_assign_all_busses(void);
+static inline unsigned int pcibios_assign_all_busses(void)
+{
+       return 1;
+}
 
 extern unsigned long PCIBIOS_MIN_IO;
 extern unsigned long PCIBIOS_MIN_MEM;
index 30320a4c890914eb8f03b18794984f0576c0fea7..8cc6ea4e9481980924bf81c71037db11588aa2cb 100644 (file)
@@ -297,11 +297,6 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask)
        return 0;
 }
 
-unsigned int pcibios_assign_all_busses(void)
-{
-       return 1;
-}
-
 int pcibios_enable_device(struct pci_dev *dev, int mask)
 {
        int err;