From: Wei Yongjun Date: Mon, 17 Oct 2016 15:13:59 +0000 (+0000) Subject: soc/fsl/bman: Use resource_size instead of computation X-Git-Tag: v4.14-rc1~1846^2^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7544424169e0ba1ffdc39edbdfa822711a59c5f;p=platform%2Fkernel%2Flinux-rpi.git soc/fsl/bman: Use resource_size instead of computation Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Signed-off-by: Wei Yongjun Signed-off-by: Scott Wood --- 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;