All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/pciback: use resource_size()
@ 2011-08-06  9:05 Thomas Meyer
  2011-08-09 14:30 ` [Xen-devel] " Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2011-08-06  9:05 UTC (permalink / raw)
  To: konrad.wilk, xen-devel, linux-kernel

From: Thomas Meyer <thomas@m3y3r.de>

 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/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---

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)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xen-devel] [PATCH] xen/pciback: use resource_size()
  2011-08-06  9:05 [PATCH] xen/pciback: use resource_size() Thomas Meyer
@ 2011-08-09 14:30 ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-08-09 14:30 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: xen-devel, linux-kernel

On Sat, Aug 06, 2011 at 11:05:35AM +0200, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@m3y3r.de>
> 
>  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@m3y3r.de>
> ---
> 
> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-09 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-06  9:05 [PATCH] xen/pciback: use resource_size() Thomas Meyer
2011-08-09 14:30 ` [Xen-devel] " Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.