WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen/pciback: use resource_size()

To: Thomas Meyer <thomas@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen/pciback: use resource_size()
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Tue, 9 Aug 2011 10:30:20 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Delivery-date: Tue, 09 Aug 2011 07:33:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1312621538.5589.45.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1312621538.5589.45.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Aug 06, 2011 at 11:05:35AM +0200, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@xxxxxxxx>
> 
>  Use resource_size function on resource object
>  instead of explicit computation.
> 
>  The semantic patch that makes this output is available
>  in scripts/coccinelle/api/resource_size.cocci.
> 
>  More information about semantic patching is available at
>  http://coccinelle.lip6.fr/

Queued up for 3.2
> 
> Signed-off-by: Thomas Meyer <thomas@xxxxxxxx>
> ---
> 
> diff -u -p a/drivers/xen/xen-pciback/conf_space_header.c 
> b/drivers/xen/xen-pciback/conf_space_header.c
> --- a/drivers/xen/xen-pciback/conf_space_header.c 2011-07-26 
> 00:46:09.730171570 +0200
> +++ b/drivers/xen/xen-pciback/conf_space_header.c 2011-08-01 
> 23:02:39.180421787 +0200
> @@ -187,7 +187,7 @@ static inline void read_dev_bar(struct p
>  
>       bar_info->val = res[pos].start |
>                       (res[pos].flags & PCI_REGION_FLAG_MASK);
> -     bar_info->len_val = res[pos].end - res[pos].start + 1;
> +     bar_info->len_val = resource_size(&res[pos]);
>  }
>  
>  static void *bar_init(struct pci_dev *dev, int offset)
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>