[PATCH] 64bit resource: change pci core and arch code to use resource_size_t
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / kernel / pci_32.c
index d9e2506db5f7e40fcf7e74c4327600040ac66a38..8474355a1a4f46d8a9e1df29a2ad403fc847713a 100644 (file)
@@ -173,18 +173,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void pcibios_align_resource(void *data, struct resource *res, unsigned long size,
-                      unsigned long align)
+void pcibios_align_resource(void *data, struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
 
        if (res->flags & IORESOURCE_IO) {
-               unsigned long start = res->start;
+               resource_size_t start = res->start;
 
                if (size > 0x100) {
                        printk(KERN_ERR "PCI: I/O Region %s/%d too large"
                               " (%lld bytes)\n", pci_name(dev),
-                              dev->resource - res, size);
+                              dev->resource - res, (unsigned long long)size);
                }
 
                if (start & 0x300) {
@@ -1756,7 +1756,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
 
 void pci_resource_to_user(const struct pci_dev *dev, int bar,
                          const struct resource *rsrc,
-                         u64 *start, u64 *end)
+                         resource_size_t *start, resource_size_t *end)
 {
        struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
        unsigned long offset = 0;