[PATCH v3 13/27] char: replace devm_ioremap_nocache with devm_ioremap

From: Yisheng Xie
Date: Sat Dec 23 2017 - 06:08:46 EST


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@xxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Yisheng Xie <xieyisheng1@xxxxxxxxxx>
---
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