From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, gwshan@linux.vnet.ibm.com
Subject: Re: [PATCH 1/4] powerpc/eeh: fix start/end/flags type in struct pci_io_addr_range{}
Date: Wed, 11 Mar 2015 16:18:59 +1100 [thread overview]
Message-ID: <20150311051859.GB10336@shangw> (raw)
In-Reply-To: <1425871052-13118-2-git-send-email-weiyang@linux.vnet.ibm.com>
On Mon, Mar 09, 2015 at 11:17:29AM +0800, Wei Yang wrote:
>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: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Thanks,
Gavin
>---
> arch/powerpc/kernel/eeh_cache.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
>diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c
>index 07d8a24..a30ed67 100644
>--- a/arch/powerpc/kernel/eeh_cache.c
>+++ b/arch/powerpc/kernel/eeh_cache.c
>@@ -48,11 +48,11 @@
> */
> struct pci_io_addr_range {
> struct rb_node rb_node;
>- unsigned long addr_lo;
>- unsigned long addr_hi;
>+ resource_size_t addr_lo;
>+ resource_size_t addr_hi;
> struct eeh_dev *edev;
> struct pci_dev *pcidev;
>- unsigned int flags;
>+ unsigned long flags;
> };
>
> static struct pci_io_addr_cache {
>@@ -125,8 +125,8 @@ static void eeh_addr_cache_print(struct pci_io_addr_cache *cache)
>
> /* Insert address range into the rb tree. */
> static struct pci_io_addr_range *
>-eeh_addr_cache_insert(struct pci_dev *dev, unsigned long alo,
>- unsigned long ahi, unsigned int flags)
>+eeh_addr_cache_insert(struct pci_dev *dev, resource_size_t alo,
>+ resource_size_t ahi, unsigned long flags)
> {
> struct rb_node **p = &pci_io_addr_cache_root.rb_root.rb_node;
> struct rb_node *parent = NULL;
>@@ -200,9 +200,9 @@ static void __eeh_addr_cache_insert_dev(struct pci_dev *dev)
>
> /* Walk resources on this device, poke them into the tree */
> for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
>- unsigned long start = pci_resource_start(dev,i);
>- unsigned long end = pci_resource_end(dev,i);
>- unsigned int flags = pci_resource_flags(dev,i);
>+ resource_size_t start = pci_resource_start(dev,i);
>+ resource_size_t end = pci_resource_end(dev,i);
>+ unsigned long flags = pci_resource_flags(dev,i);
>
> /* We are interested only bus addresses, not dma or other stuff */
> if (0 == (flags & (IORESOURCE_IO | IORESOURCE_MEM)))
>--
>1.7.9.5
>
next prev parent reply other threads:[~2015-03-11 5:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 3:17 [PATCH 0/4] EEH Cleanup Wei Yang
2015-03-09 3:17 ` [PATCH 1/4] powerpc/eeh: fix start/end/flags type in struct pci_io_addr_range{} Wei Yang
2015-03-11 5:18 ` Gavin Shan [this message]
2015-03-09 3:17 ` [PATCH 2/4] powerpc/eeh: fix comment for wait_state() Wei Yang
2015-03-11 5:17 ` Gavin Shan
2015-03-09 3:17 ` [PATCH 3/4] powerpc/eeh: fix powernv_eeh_wait_state delay logic Wei Yang
2015-03-11 5:13 ` Gavin Shan
2015-03-11 5:47 ` Wei Yang
2015-03-09 3:17 ` [PATCH 4/4] powerpc/eeh: remove unused macro IS_BRIDGE Wei Yang
2015-03-11 5:07 ` Gavin Shan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150311051859.GB10336@shangw \
--to=gwshan@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=weiyang@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox