Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2018-01-02 Thread Linus Walleij
On Wed, Jan 3, 2018 at 7:05 AM, Yisheng Xie  wrote:
> On 2018/1/2 16:41, Linus Walleij wrote:
>> On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie  wrote:
>>
>>> 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 
>>> Cc: linux-g...@vger.kernel.org
>>> Signed-off-by: Yisheng Xie 
>
> Well, I list the ARCHs related to the change file, do not include 
> cris,ia64,mn10300
> and openrisc, which ioremap is not the same as ioremap_nocache, as discussed 
> in cover
> letter. So please let me know if I need update the comment.

I dropped the patch until it's figured out that none of these arches
are affected
by the change.

Please resend with a comment explaining why the change is harmless on the
architectures these drivers are for.

Yours,
Linus Walleij


Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2018-01-02 Thread Linus Walleij
On Wed, Jan 3, 2018 at 7:05 AM, Yisheng Xie  wrote:
> On 2018/1/2 16:41, Linus Walleij wrote:
>> On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie  wrote:
>>
>>> 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 
>>> Cc: linux-g...@vger.kernel.org
>>> Signed-off-by: Yisheng Xie 
>
> Well, I list the ARCHs related to the change file, do not include 
> cris,ia64,mn10300
> and openrisc, which ioremap is not the same as ioremap_nocache, as discussed 
> in cover
> letter. So please let me know if I need update the comment.

I dropped the patch until it's figured out that none of these arches
are affected
by the change.

Please resend with a comment explaining why the change is harmless on the
architectures these drivers are for.

Yours,
Linus Walleij


Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2018-01-02 Thread Yisheng Xie


On 2018/1/2 16:41, Linus Walleij wrote:
> On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie  wrote:
> 
>> 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 
>> Cc: linux-g...@vger.kernel.org
>> Signed-off-by: Yisheng Xie 

Well, I list the ARCHs related to the change file, do not include 
cris,ia64,mn10300
and openrisc, which ioremap is not the same as ioremap_nocache, as discussed in 
cover
letter. So please let me know if I need update the comment.

 change_fileARCH
 drivers/gpio/gpio-ath79.c | 3 +--  mips
 drivers/gpio/gpio-em.c| 6 ++   arm
 drivers/gpio/gpio-htc-egpio.c | 4 ++-- arm
 drivers/gpio/gpio-xgene.c | 3 +--  arm64

Thanks
Yisheng
> 
> Patch applied.
> 
> Yours,
> Linus Walleij
> 
> 



Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2018-01-02 Thread Yisheng Xie


On 2018/1/2 16:41, Linus Walleij wrote:
> On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie  wrote:
> 
>> 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 
>> Cc: linux-g...@vger.kernel.org
>> Signed-off-by: Yisheng Xie 

Well, I list the ARCHs related to the change file, do not include 
cris,ia64,mn10300
and openrisc, which ioremap is not the same as ioremap_nocache, as discussed in 
cover
letter. So please let me know if I need update the comment.

 change_fileARCH
 drivers/gpio/gpio-ath79.c | 3 +--  mips
 drivers/gpio/gpio-em.c| 6 ++   arm
 drivers/gpio/gpio-htc-egpio.c | 4 ++-- arm
 drivers/gpio/gpio-xgene.c | 3 +--  arm64

Thanks
Yisheng
> 
> Patch applied.
> 
> Yours,
> Linus Walleij
> 
> 



Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2018-01-02 Thread Linus Walleij
On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie  wrote:

> 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 
> Cc: linux-g...@vger.kernel.org
> Signed-off-by: Yisheng Xie 

Patch applied.

Yours,
Linus Walleij


Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2018-01-02 Thread Linus Walleij
On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie  wrote:

> 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 
> Cc: linux-g...@vger.kernel.org
> Signed-off-by: Yisheng Xie 

Patch applied.

Yours,
Linus Walleij


[PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2017-12-23 Thread Yisheng Xie
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 
Cc: linux-g...@vger.kernel.org
Signed-off-by: Yisheng Xie 
---
 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(
-   >dev, res->start, resource_size(res));
+   ctrl->base = devm_ioremap(>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(>dev, io[0]->start,
-   resource_size(io[0]));
+   p->base0 = devm_ioremap(>dev, io[0]->start, resource_size(io[0]));
if (!p->base0) {
dev_err(>dev, "failed to remap low I/O memory\n");
ret = -ENXIO;
goto err0;
}
 
-   p->base1 = devm_ioremap_nocache(>dev, io[1]->start,
-  resource_size(io[1]));
+   p->base1 = devm_ioremap(>dev, io[1]->start, resource_size(io[1]));
if (!p->base1) {
dev_err(>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(>dev, res->start,
-resource_size(res));
+   ei->base_addr = devm_ioremap(>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(>dev, res->start,
-   resource_size(res));
+   gpio->base = devm_ioremap(>dev, res->start, resource_size(res));
if (!gpio->base) {
err = -ENOMEM;
goto err;
-- 
1.8.3.1



[PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap

2017-12-23 Thread Yisheng Xie
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 
Cc: linux-g...@vger.kernel.org
Signed-off-by: Yisheng Xie 
---
 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(
-   >dev, res->start, resource_size(res));
+   ctrl->base = devm_ioremap(>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(>dev, io[0]->start,
-   resource_size(io[0]));
+   p->base0 = devm_ioremap(>dev, io[0]->start, resource_size(io[0]));
if (!p->base0) {
dev_err(>dev, "failed to remap low I/O memory\n");
ret = -ENXIO;
goto err0;
}
 
-   p->base1 = devm_ioremap_nocache(>dev, io[1]->start,
-  resource_size(io[1]));
+   p->base1 = devm_ioremap(>dev, io[1]->start, resource_size(io[1]));
if (!p->base1) {
dev_err(>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(>dev, res->start,
-resource_size(res));
+   ei->base_addr = devm_ioremap(>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(>dev, res->start,
-   resource_size(res));
+   gpio->base = devm_ioremap(>dev, res->start, resource_size(res));
if (!gpio->base) {
err = -ENOMEM;
goto err;
-- 
1.8.3.1