Skip to content

Commit

Permalink
xen/pciback: use resource_size()
Browse files Browse the repository at this point in the history
 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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Thomas Meyer authored and Konrad Rzeszutek Wilk committed Sep 21, 2011
1 parent b6fd41e commit 5fa9991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/xen-pciback/conf_space_header.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static inline void read_dev_bar(struct pci_dev *dev,

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)
Expand Down

0 comments on commit 5fa9991

Please sign in to comment.