lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1476717239-12340-1-git-send-email-weiyj.lk@gmail.com>
Date:   Mon, 17 Oct 2016 15:13:59 +0000
From:   Wei Yongjun <weiyj.lk@...il.com>
To:     Claudiu Manoil <claudiu.manoil@....com>,
        Roy Pledge <roy.pledge@....com>, Scott Wood <oss@...error.net>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>, linux-kernel@...r.kernel.org
Subject: [PATCH -next] soc/bman: Use resource_size instead of computation

From: Wei Yongjun <weiyongjun1@...wei.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@...wei.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ