All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] soc/bman: Use resource_size instead of computation
@ 2016-10-17 15:13 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2016-10-17 15:13 UTC (permalink / raw)
  To: Claudiu Manoil, Roy Pledge, Scott Wood; +Cc: Wei Yongjun, linux-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

Use resource_size function on resource object
instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/soc/fsl/qbman/bman_ccsr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/fsl/qbman/bman_ccsr.c b/drivers/soc/fsl/qbman/bman_ccsr.c
index 9deb052..a8e8389 100644
--- a/drivers/soc/fsl/qbman/bman_ccsr.c
+++ b/drivers/soc/fsl/qbman/bman_ccsr.c
@@ -181,8 +181,7 @@ static int fsl_bman_probe(struct platform_device *pdev)
 			node->full_name);
 		return -ENXIO;
 	}
-	bm_ccsr_start = devm_ioremap(dev, res->start,
-				     res->end - res->start + 1);
+	bm_ccsr_start = devm_ioremap(dev, res->start, resource_size(res));
 	if (!bm_ccsr_start)
 		return -ENXIO;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-17 15:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 15:13 [PATCH -next] soc/bman: Use resource_size instead of computation Wei Yongjun

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.