Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934339AbcJQPOS (ORCPT ); Mon, 17 Oct 2016 11:14:18 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:36785 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754734AbcJQPOK (ORCPT ); Mon, 17 Oct 2016 11:14:10 -0400 From: Wei Yongjun To: Claudiu Manoil , Roy Pledge , Scott Wood Cc: Wei Yongjun , linux-kernel@vger.kernel.org Subject: [PATCH -next] soc/bman: Use resource_size instead of computation Date: Mon, 17 Oct 2016 15:13:59 +0000 Message-Id: <1476717239-12340-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 838 Lines: 25 From: Wei Yongjun Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Signed-off-by: Wei Yongjun --- 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;