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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1514026690-32863-1-git-send-email-xieyisheng1@huawei.com>
Date:   Sat, 23 Dec 2017 18:58:10 +0800
From:   Yisheng Xie <xieyisheng1@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>
CC:     <ysxie@...mail.com>, Yisheng Xie <xieyisheng1@...wei.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        <linux-gpio@...r.kernel.org>
Subject: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

Default ioremap is ioremap_nocache, so devm_ioremap has the same
function with devm_ioremap_nocache, which can just be killed to
save the size of devres.o

This patch is to use use devm_ioremap instead of devm_ioremap_nocache,
which should not have any function change but prepare for killing
devm_ioremap_nocache.

Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: linux-gpio@...r.kernel.org
Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
---
 drivers/gpio/gpio-ath79.c     | 3 +--
 drivers/gpio/gpio-em.c        | 6 ++----
 drivers/gpio/gpio-htc-egpio.c | 4 ++--
 drivers/gpio/gpio-xgene.c     | 3 +--
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index 5fad89d..7af2457 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -258,8 +258,7 @@ static int ath79_gpio_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctrl->base = devm_ioremap_nocache(
-		&pdev->dev, res->start, resource_size(res));
+	ctrl->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
 	if (!ctrl->base)
 		return -ENOMEM;
 
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index b86e09e..8797da8 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -300,16 +300,14 @@ static int em_gio_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
-	p->base0 = devm_ioremap_nocache(&pdev->dev, io[0]->start,
-					resource_size(io[0]));
+	p->base0 = devm_ioremap(&pdev->dev, io[0]->start, resource_size(io[0]));
 	if (!p->base0) {
 		dev_err(&pdev->dev, "failed to remap low I/O memory\n");
 		ret = -ENXIO;
 		goto err0;
 	}
 
-	p->base1 = devm_ioremap_nocache(&pdev->dev, io[1]->start,
-				   resource_size(io[1]));
+	p->base1 = devm_ioremap(&pdev->dev, io[1]->start, resource_size(io[1]));
 	if (!p->base1) {
 		dev_err(&pdev->dev, "failed to remap high I/O memory\n");
 		ret = -ENXIO;
diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 271356e..ea3a2ee 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -299,8 +299,8 @@ static int __init egpio_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
 		goto fail;
-	ei->base_addr = devm_ioremap_nocache(&pdev->dev, res->start,
-					     resource_size(res));
+	ei->base_addr = devm_ioremap(&pdev->dev, res->start,
+				     resource_size(res));
 	if (!ei->base_addr)
 		goto fail;
 	pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index f1c6ec1..9898c83 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -182,8 +182,7 @@ static int xgene_gpio_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	gpio->base = devm_ioremap_nocache(&pdev->dev, res->start,
-							resource_size(res));
+	gpio->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
 	if (!gpio->base) {
 		err = -ENOMEM;
 		goto err;
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ