Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1502092 > unrolled thread

[PATCH -next] soc/bman: Use resource_size instead of computation

Started byWei Yongjun <weiyj.lk@gmail.com>
First post2016-10-17 17:20 +0200
Last post2016-10-17 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH -next] soc/bman: Use resource_size instead of computation Wei Yongjun <weiyj.lk@gmail.com> - 2016-10-17 17:20 +0200

#1502092 — [PATCH -next] soc/bman: Use resource_size instead of computation

FromWei Yongjun <weiyj.lk@gmail.com>
Date2016-10-17 17:20 +0200
Subject[PATCH -next] soc/bman: Use resource_size instead of computation
Message-ID<sthRL-59n-13@gated-at.bofh.it>
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;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web