* [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap
@ 2017-12-23 10:58 Yisheng Xie
2018-01-02 8:41 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Yisheng Xie @ 2017-12-23 10:58 UTC (permalink / raw)
To: linux-kernel, gregkh; +Cc: ysxie, Yisheng Xie, Linus Walleij, linux-gpio
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@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap
2017-12-23 10:58 [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap Yisheng Xie
@ 2018-01-02 8:41 ` Linus Walleij
2018-01-03 6:05 ` Yisheng Xie
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2018-01-02 8:41 UTC (permalink / raw)
To: Yisheng Xie; +Cc: linux-kernel, Greg KH, ysxie, linux-gpio
On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie <xieyisheng1@huawei.com> 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 <linus.walleij@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap
2018-01-02 8:41 ` Linus Walleij
@ 2018-01-03 6:05 ` Yisheng Xie
2018-01-03 7:48 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Yisheng Xie @ 2018-01-03 6:05 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-kernel, Greg KH, ysxie, linux-gpio
On 2018/1/2 16:41, Linus Walleij wrote:
> On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie <xieyisheng1@huawei.com> 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 <linus.walleij@linaro.org>
>> Cc: linux-gpio@vger.kernel.org
>> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
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_file ARCH
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
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap
2018-01-03 6:05 ` Yisheng Xie
@ 2018-01-03 7:48 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2018-01-03 7:48 UTC (permalink / raw)
To: Yisheng Xie; +Cc: linux-kernel, Greg KH, ysxie, linux-gpio
On Wed, Jan 3, 2018 at 7:05 AM, Yisheng Xie <xieyisheng1@huawei.com> wrote:
> On 2018/1/2 16:41, Linus Walleij wrote:
>> On Sat, Dec 23, 2017 at 11:58 AM, Yisheng Xie <xieyisheng1@huawei.com> 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 <linus.walleij@linaro.org>
>>> Cc: linux-gpio@vger.kernel.org
>>> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-03 7:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-23 10:58 [PATCH v3 06/27] gpio: replace devm_ioremap_nocache with devm_ioremap Yisheng Xie
2018-01-02 8:41 ` Linus Walleij
2018-01-03 6:05 ` Yisheng Xie
2018-01-03 7:48 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).