lkml.org 
[lkml]   [2017]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 13/27] char: replace devm_ioremap_nocache with devm_ioremap
Date
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: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
---
drivers/char/hw_random/bcm63xx-rng.c | 3 +--
drivers/char/hw_random/octeon-rng.c | 10 ++++------
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c
index 5132c9c..10e7d9a 100644
--- a/drivers/char/hw_random/bcm63xx-rng.c
+++ b/drivers/char/hw_random/bcm63xx-rng.c
@@ -112,8 +112,7 @@ static int bcm63xx_rng_probe(struct platform_device *pdev)
return -EBUSY;
}

- priv->regs = devm_ioremap_nocache(&pdev->dev, r->start,
- resource_size(r));
+ priv->regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!priv->regs) {
dev_err(&pdev->dev, "ioremap failed");
return -ENOMEM;
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c
index 8c78aa0..d50b9b5 100644
--- a/drivers/char/hw_random/octeon-rng.c
+++ b/drivers/char/hw_random/octeon-rng.c
@@ -81,15 +81,13 @@ static int octeon_rng_probe(struct platform_device *pdev)
return -ENOENT;


- rng->control_status = devm_ioremap_nocache(&pdev->dev,
- res_ports->start,
- sizeof(u64));
+ rng->control_status = devm_ioremap(&pdev->dev, res_ports->start,
+ sizeof(u64));
if (!rng->control_status)
return -ENOENT;

- rng->result = devm_ioremap_nocache(&pdev->dev,
- res_result->start,
- sizeof(u64));
+ rng->result = devm_ioremap(&pdev->dev, res_result->start,
+ sizeof(u64));
if (!rng->result)
return -ENOENT;

--
1.8.3.1
\
 
 \ /
  Last update: 2017-12-23 12:09    [W:0.056 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site