xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Isaku Yamahata <yamahata@valinux.co.jp>
To: Jan Beulich <JBeulich@novell.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] linux: fix PCI resource reservation option parsing
Date: Thu, 25 Mar 2010 18:54:11 +0900	[thread overview]
Message-ID: <20100325095411.GC15718@valinux.co.jp> (raw)
In-Reply-To: <4BAB3BB10200007800036DDD@vpn.id2.novell.com>

Looks good. Thank you.
Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>


On Thu, Mar 25, 2010 at 09:32:17AM +0000, Jan Beulich wrote:
> Start looking for the second '+' after the first one (rather than at
> the beginning again). Also fail if second string cannot be parsed.
> 
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> 
> --- a/drivers/pci/reserve.c
> +++ b/drivers/pci/reserve.c
> @@ -60,16 +60,11 @@ static int pci_reserve_parse_one(
>  	p = strchr(str, '+');
>  	if (p == NULL)
>  		return -EINVAL;
> -	p++;
> -	if (pci_reserve_parse_size(p, io_size, mem_size))
> +	if (pci_reserve_parse_size(++p, io_size, mem_size))
>  		return -EINVAL;
>  
> -	p = strchr(str, '+');
> -	if (p != NULL) {
> -		p++;
> -		pci_reserve_parse_size(p, io_size, mem_size);
> -	}
> -	return 0;
> +	p = strchr(p, '+');
> +	return p ? pci_reserve_parse_size(p + 1, io_size, mem_size) : 0;
>  }
>  
>  static unsigned long pci_reserve_size(struct pci_bus *pbus, int flags)
> 
> 
> 

-- 
yamahata

      reply	other threads:[~2010-03-25  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25  9:32 [PATCH] linux: fix PCI resource reservation option parsing Jan Beulich
2010-03-25  9:54 ` Isaku Yamahata [this message]

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=20100325095411.GC15718@valinux.co.jp \
    --to=yamahata@valinux.co.jp \
    --cc=JBeulich@novell.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).