aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/pci/pci-common.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2013-01-04 03:14:46 -0500
committerMichal Simek <michal.simek@xilinx.com>2013-01-04 03:52:35 -0500
commitf7eaacc19c6f43ff9c897ad13a7893d298aab6fa (patch)
tree435c95664dd91e648e0cd3ac87bea892043882e2 /arch/microblaze/pci/pci-common.c
parent0e1ec2d0b499298a502a46573c87d74a6052dfa1 (diff)
microblaze: Fix pci compilation and sparse warnings
Warning log: CHECK arch/microblaze/pci/pci-common.c arch/microblaze/pci/pci-common.c:290:14: warning: Using plain integer as NULL pointer arch/microblaze/pci/pci-common.c:1127:6: warning: symbol 'pcibios_allocate_bus_resources' was not declared. Should it be static? arch/microblaze/pci/pci-common.c:1436:61: warning: incorrect type in argument 3 (different base types) arch/microblaze/pci/pci-common.c:1436:61: expected unsigned int [unsigned] [usertype] offset arch/microblaze/pci/pci-common.c:1436:61: got void [noderef] <asn:2>* CC arch/microblaze/pci/pci-common.o arch/microblaze/pci/pci-common.c: In function 'pci_proc_domain': arch/microblaze/pci/pci-common.c:825:25: warning: unused variable 'hose' [-Wunused-variable] arch/microblaze/pci/pci-common.c: In function 'pcibios_allocate_bus_resources': arch/microblaze/pci/pci-common.c:1182:1: warning: label 'clear_resource' defined but not used [-Wunused-label] arch/microblaze/pci/pci-common.c: In function 'pcibios_setup_phb_resources': arch/microblaze/pci/pci-common.c:1436:2: warning: passing argument 3 of 'pci_add_resource_offset' makes integer from pointer without a cast [enabled by default] include/linux/pci.h:999:6: note: expected 'resource_size_t' but argument is of type 'void *' Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/pci/pci-common.c')
-rw-r--r--arch/microblaze/pci/pci-common.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index a1c5b996d66d..e84b129620db 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -287,7 +287,7 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
287 unsigned long io_offset = 0; 287 unsigned long io_offset = 0;
288 int i, res_bit; 288 int i, res_bit;
289 289
290 if (hose == 0) 290 if (!hose)
291 return NULL; /* should never happen */ 291 return NULL; /* should never happen */
292 292
293 /* If memory, add on the PCI bridge address offset */ 293 /* If memory, add on the PCI bridge address offset */
@@ -822,8 +822,6 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
822/* Decide whether to display the domain number in /proc */ 822/* Decide whether to display the domain number in /proc */
823int pci_proc_domain(struct pci_bus *bus) 823int pci_proc_domain(struct pci_bus *bus)
824{ 824{
825 struct pci_controller *hose = pci_bus_to_host(bus);
826
827 return 0; 825 return 0;
828} 826}
829 827
@@ -1124,7 +1122,7 @@ static int __init reparent_resources(struct resource *parent,
1124 * as well. 1122 * as well.
1125 */ 1123 */
1126 1124
1127void pcibios_allocate_bus_resources(struct pci_bus *bus) 1125static void pcibios_allocate_bus_resources(struct pci_bus *bus)
1128{ 1126{
1129 struct pci_bus *b; 1127 struct pci_bus *b;
1130 int i; 1128 int i;
@@ -1179,7 +1177,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1179 } 1177 }
1180 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1178 printk(KERN_WARNING "PCI: Cannot allocate resource region "
1181 "%d of PCI bridge %d, will remap\n", i, bus->number); 1179 "%d of PCI bridge %d, will remap\n", i, bus->number);
1182clear_resource: 1180
1183 res->start = res->end = 0; 1181 res->start = res->end = 0;
1184 res->flags = 0; 1182 res->flags = 0;
1185 } 1183 }
@@ -1433,7 +1431,8 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s
1433 res->end = res->start + IO_SPACE_LIMIT; 1431 res->end = res->start + IO_SPACE_LIMIT;
1434 res->flags = IORESOURCE_IO; 1432 res->flags = IORESOURCE_IO;
1435 } 1433 }
1436 pci_add_resource_offset(resources, res, hose->io_base_virt - _IO_BASE); 1434 pci_add_resource_offset(resources, res,
1435 (__force resource_size_t)(hose->io_base_virt - _IO_BASE));
1437 1436
1438 pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n", 1437 pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n",
1439 (unsigned long long)res->start, 1438 (unsigned long long)res->start,