linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma: mv_xor: use resource_size()
@ 2011-06-06 20:49 H Hartley Sweeten
  2011-06-06 21:52 ` [RFC] Convert "resource->end - resource->start + 1" to resource_size(resource) via coccinelle Joe Perches
  2011-07-13 22:02 ` [PATCH] dma: mv_xor: use resource_size() Koul, Vinod
  0 siblings, 2 replies; 16+ messages in thread
From: H Hartley Sweeten @ 2011-06-06 20:49 UTC (permalink / raw)
  To: Linux Kernel; +Cc: dan.j.williams, vinod.koul

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Dan Williams <dan.j.williams@intel.com> (supporter:ASYNCHRONOUS TRAN...)
Cc: Vinod Koul <vinod.koul@intel.com> (supporter:DMA GENERIC OFFLO...)

---

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 954e334..9a353c2 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1305,7 +1305,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	msp->xor_base = devm_ioremap(&pdev->dev, res->start,
-				     res->end - res->start + 1);
+				     resource_size(res));
 	if (!msp->xor_base)
 		return -EBUSY;
 
@@ -1314,7 +1314,7 @@ static int mv_xor_shared_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	msp->xor_high_base = devm_ioremap(&pdev->dev, res->start,
-					  res->end - res->start + 1);
+					  resource_size(res));
 	if (!msp->xor_high_base)
 		return -EBUSY;
 

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

end of thread, other threads:[~2011-07-13 22:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06 20:49 [PATCH] dma: mv_xor: use resource_size() H Hartley Sweeten
2011-06-06 21:52 ` [RFC] Convert "resource->end - resource->start + 1" to resource_size(resource) via coccinelle Joe Perches
2011-06-06 21:57   ` H Hartley Sweeten
2011-06-07  1:04     ` [PATCH] treewide: Convert uses of struct resource * to resource_size(ptr) Joe Perches
2011-06-07  1:26       ` Mike Frysinger
2011-06-07 16:31       ` H Hartley Sweeten
2011-06-07 18:27       ` H Hartley Sweeten
2011-06-07 18:35         ` Joe Perches
2011-06-07 21:29         ` [TRIVIAL PATCH v2] treewide: Convert uses of struct resource " Joe Perches
2011-06-09 12:25           ` Jiri Kosina
2011-06-09 16:09             ` Joe Perches
2011-06-07  5:07   ` [Cocci] [RFC] Convert "resource->end - resource->start + 1" to resource_size(resource) via coccinelle Julia Lawall
2011-06-07  5:32     ` Joe Perches
2011-06-07  5:42       ` Julia Lawall
2011-06-07  7:42         ` Joe Perches
2011-07-13 22:02 ` [PATCH] dma: mv_xor: use resource_size() Koul, Vinod

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).