diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index f1e92bf743c2..670a998c0aba 100644 --- a/arch/mips/pci/pci-legacy.c +++ b/arch/mips/pci/pci-legacy.c @@ -58,9 +58,7 @@ pcibios_align_resource(void *data, const struct resource *res, if (start < PCIBIOS_MIN_IO + hose->io_resource->start) start = PCIBIOS_MIN_IO + hose->io_resource->start; - /* - * Put everything into 0x00-0xff region modulo 0x400 - */ + /* Put everything into 0x00-0xff region modulo 0x400 */ if (start & 0x300) start = (start + 0x3ff) & ~0x3ff; } else if (res->flags & IORESOURCE_MEM) { @@ -88,10 +86,10 @@ static void pcibios_scanbus(struct pci_controller *hose) if (hose->get_busno && pci_has_flag(PCI_PROBE_ONLY)) next_busno = (*hose->get_busno)(); - pci_add_resource_offset(&resources, - hose->mem_resource, hose->mem_offset); - pci_add_resource_offset(&resources, - hose->io_resource, hose->io_offset); + pci_add_resource_offset(&resources, hose->mem_resource, + hose->mem_offset); + pci_add_resource_offset(&resources, hose->io_resource, + hose->io_offset); pci_add_resource(&resources, hose->busn_resource); list_splice_init(&resources, &bridge->windows); bridge->dev.parent = NULL; @@ -150,18 +148,16 @@ void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node) switch (range.flags & IORESOURCE_TYPE_BITS) { case IORESOURCE_IO: - pr_info(" IO 0x%016llx..0x%016llx\n", - range.cpu_addr, - range.cpu_addr + range.size - 1); + pr_info(" IO 0x%016llx..0x%016llx\n", range.cpu_addr, + (range.cpu_addr + range.size - 1)); hose->io_map_base = (unsigned long)ioremap(range.cpu_addr, range.size); res = hose->io_resource; break; case IORESOURCE_MEM: - pr_info(" MEM 0x%016llx..0x%016llx\n", - range.cpu_addr, - range.cpu_addr + range.size - 1); + pr_info(" MEM 0x%016llx..0x%016llx\n", range.cpu_addr, + (range.cpu_addr + range.size - 1)); res = hose->mem_resource; break; } @@ -206,10 +202,8 @@ void register_pci_controller(struct pci_controller *hose) /* * Do not panic here but later - this might happen before console init. */ - if (!hose->io_map_base) { - printk(KERN_WARNING - "registering PCI controller with io_map_base unset\n"); - } + if (!hose->io_map_base) + pr_warn("registering PCI controller with io_map_base unset\n"); /* * Scan the bus if it is register after the PCI subsystem @@ -224,8 +218,7 @@ void register_pci_controller(struct pci_controller *hose) return; out: - printk(KERN_WARNING - "Skipping PCI bus scan due to resource conflict\n"); + pr_warn("Skipping PCI bus scan due to resource conflict\n"); } static int __init pcibios_init(void) @@ -251,9 +244,9 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) pci_read_config_word(dev, PCI_COMMAND, &cmd); old_cmd = cmd; - for (idx=0; idx < PCI_NUM_RESOURCES; idx++) { + for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { /* Only set up the requested stuff */ - if (!(mask & (1<resource[idx]; @@ -276,6 +269,7 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask) pci_info(dev, "enabling device (%04x -> %04x)\n", old_cmd, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd); } + return 0; } @@ -305,5 +299,6 @@ char *__init pcibios_setup(char *str) { if (pcibios_plat_setup) return pcibios_plat_setup(str); + return str; }