Commit 37213529 authored by Wei Yang's avatar Wei Yang Committed by Michael Ellerman

powerpc/eeh: fix start/end/flags type in struct pci_io_addr_range{}

struct pci_io_addr_range{} stores the information of pci resources. It
would be better to keep these related fields have the same type as in
struct resource{}.

This patch fixes the start/end/flags type in struct pci_io_addr_range{} to
have the same type as in struct resource{}.
Signed-off-by: default avatarWei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 68cbbc3a
...@@ -48,11 +48,11 @@ ...@@ -48,11 +48,11 @@
*/ */
struct pci_io_addr_range { struct pci_io_addr_range {
struct rb_node rb_node; struct rb_node rb_node;
unsigned long addr_lo; resource_size_t addr_lo;
unsigned long addr_hi; resource_size_t addr_hi;
struct eeh_dev *edev; struct eeh_dev *edev;
struct pci_dev *pcidev; struct pci_dev *pcidev;
unsigned int flags; unsigned long flags;
}; };
static struct pci_io_addr_cache { static struct pci_io_addr_cache {
...@@ -125,8 +125,8 @@ static void eeh_addr_cache_print(struct pci_io_addr_cache *cache) ...@@ -125,8 +125,8 @@ static void eeh_addr_cache_print(struct pci_io_addr_cache *cache)
/* Insert address range into the rb tree. */ /* Insert address range into the rb tree. */
static struct pci_io_addr_range * static struct pci_io_addr_range *
eeh_addr_cache_insert(struct pci_dev *dev, unsigned long alo, eeh_addr_cache_insert(struct pci_dev *dev, resource_size_t alo,
unsigned long ahi, unsigned int flags) resource_size_t ahi, unsigned long flags)
{ {
struct rb_node **p = &pci_io_addr_cache_root.rb_root.rb_node; struct rb_node **p = &pci_io_addr_cache_root.rb_root.rb_node;
struct rb_node *parent = NULL; struct rb_node *parent = NULL;
...@@ -197,9 +197,9 @@ static void __eeh_addr_cache_insert_dev(struct pci_dev *dev) ...@@ -197,9 +197,9 @@ static void __eeh_addr_cache_insert_dev(struct pci_dev *dev)
/* Walk resources on this device, poke them into the tree */ /* Walk resources on this device, poke them into the tree */
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
unsigned long start = pci_resource_start(dev,i); resource_size_t start = pci_resource_start(dev,i);
unsigned long end = pci_resource_end(dev,i); resource_size_t end = pci_resource_end(dev,i);
unsigned int flags = pci_resource_flags(dev,i); unsigned long flags = pci_resource_flags(dev,i);
/* We are interested only bus addresses, not dma or other stuff */ /* We are interested only bus addresses, not dma or other stuff */
if (0 == (flags & (IORESOURCE_IO | IORESOURCE_MEM))) if (0 == (flags & (IORESOURCE_IO | IORESOURCE_MEM)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment