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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE19090200EA82@mi8nycmail19.Mi8.com>
Date:	Mon, 14 Dec 2009 17:33:43 -0500
From:	"H Hartley Sweeten" <hartleys@...ionengravers.com>
To:	"kernel list" <linux-kernel@...r.kernel.org>,
	<spi-devel-general@...ts.sourceforge.net>
Cc:	"David Brownell" <dbrownell@...rs.sourceforge.net>,
	<cooloney@...nel.org>
Subject: [PATCH] spi_bfin5xx.c: use resource_size()

Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Cc: Bryan Wu <cooloney@...nel.org>

---

diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 73e24ef..1d41058 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1294,7 +1294,7 @@ static int __init bfin_spi_probe(struct platform_device *pdev)
 		goto out_error_get_res;
 	}
 
-	drv_data->regs_base = ioremap(res->start, (res->end - res->start + 1));
+	drv_data->regs_base = ioremap(res->start, resource_size(res));
 	if (drv_data->regs_base == NULL) {
 		dev_err(dev, "Cannot map IO\n");
 		status = -ENXIO; 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ