linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bhelgaas@google.com (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] bus: mvebu-mbus: Fix incorrect size for PCI aperture resources
Date: Fri, 14 Feb 2014 11:29:10 -0700	[thread overview]
Message-ID: <20140214182910.GC31093@google.com> (raw)
In-Reply-To: <1392245828-23244-1-git-send-email-jgunthorpe@obsidianresearch.com>

On Wed, Feb 12, 2014 at 03:57:07PM -0700, Jason Gunthorpe wrote:
> reg[0] is the DT base, reg[1] is the DT length in bytes,
> struct resource.end is the inclusive end address, so a -1 is
> required.
> 
> Tested on kirkwood.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

Do these two patches need to go together?  I don't maintain
drivers/bus/mvebu-mbus.c, but if these should be kept together, I'd be
happy to merge them both, given the appropriate ack from Jason C or Thomas.

> ---
>  drivers/bus/mvebu-mbus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
> index 2394e97..7fd54e9 100644
> --- a/drivers/bus/mvebu-mbus.c
> +++ b/drivers/bus/mvebu-mbus.c
> @@ -876,14 +876,14 @@ static void __init mvebu_mbus_get_pcie_resources(struct device_node *np,
>  	ret = of_property_read_u32_array(np, "pcie-mem-aperture", reg, ARRAY_SIZE(reg));
>  	if (!ret) {
>  		mem->start = reg[0];
> -		mem->end = mem->start + reg[1];
> +		mem->end = mem->start + reg[1] - 1;
>  		mem->flags = IORESOURCE_MEM;
>  	}
>  
>  	ret = of_property_read_u32_array(np, "pcie-io-aperture", reg, ARRAY_SIZE(reg));
>  	if (!ret) {
>  		io->start = reg[0];
> -		io->end = io->start + reg[1];
> +		io->end = io->start + reg[1] - 1;
>  		io->flags = IORESOURCE_IO;
>  	}
>  }
> -- 
> 1.8.1.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-02-14 18:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 22:57 [PATCH 1/2] bus: mvebu-mbus: Fix incorrect size for PCI aperture resources Jason Gunthorpe
2014-02-12 22:57 ` [PATCH 2/2] PCI: mvebu - Call request_resources on the apertures Jason Gunthorpe
2014-02-12 23:24   ` Arnd Bergmann
2014-02-12 23:22 ` [PATCH 1/2] bus: mvebu-mbus: Fix incorrect size for PCI aperture resources Arnd Bergmann
2014-02-14 18:29 ` Bjorn Helgaas [this message]
2014-02-17  1:39   ` Jason Cooper
2014-02-18 20:38     ` Bjorn Helgaas
2014-02-18 17:05   ` Jason Gunthorpe

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=20140214182910.GC31093@google.com \
    --to=bhelgaas@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).