linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 18/27] pinctrl: replace devm_ioremap_nocache with devm_ioremap
@ 2017-12-23 11:00 Yisheng Xie
  2018-01-02  8:43 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Yisheng Xie @ 2017-12-23 11:00 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/pinctrl/bcm/pinctrl-ns2-mux.c         | 2 +-
 drivers/pinctrl/bcm/pinctrl-nsp-mux.c         | 4 ++--
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 2 +-
 drivers/pinctrl/pinctrl-amd.c                 | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
index 4b5cf0e..e2676fbe 100644
--- a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
@@ -1048,7 +1048,7 @@ static int ns2_pinmux_probe(struct platform_device *pdev)
 		return PTR_ERR(pinctrl->base0);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	pinctrl->base1 = devm_ioremap_nocache(&pdev->dev, res->start,
+	pinctrl->base1 = devm_ioremap(&pdev->dev, res->start,
 					resource_size(res));
 	if (!pinctrl->base1) {
 		dev_err(&pdev->dev, "unable to map I/O space\n");
diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-mux.c b/drivers/pinctrl/bcm/pinctrl-nsp-mux.c
index 35c1765..df82e52 100644
--- a/drivers/pinctrl/bcm/pinctrl-nsp-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-nsp-mux.c
@@ -577,8 +577,8 @@ static int nsp_pinmux_probe(struct platform_device *pdev)
 		return PTR_ERR(pinctrl->base0);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	pinctrl->base1 = devm_ioremap_nocache(&pdev->dev, res->start,
-					      resource_size(res));
+	pinctrl->base1 = devm_ioremap(&pdev->dev, res->start,
+				      resource_size(res));
 	if (!pinctrl->base1) {
 		dev_err(&pdev->dev, "unable to map I/O space\n");
 		return -ENOMEM;
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index a4e9f43..1f192e6 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -615,7 +615,7 @@ int imx1_pinctrl_core_probe(struct platform_device *pdev,
 	if (!res)
 		return -ENOENT;
 
-	ipctl->base = devm_ioremap_nocache(&pdev->dev, res->start,
+	ipctl->base = devm_ioremap(&pdev->dev, res->start,
 			resource_size(res));
 	if (!ipctl->base)
 		return -ENOMEM;
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 61d830c..79de76c 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -825,8 +825,8 @@ static int amd_gpio_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	gpio_dev->base = devm_ioremap_nocache(&pdev->dev, res->start,
-						resource_size(res));
+	gpio_dev->base = devm_ioremap(&pdev->dev, res->start,
+					resource_size(res));
 	if (!gpio_dev->base)
 		return -ENOMEM;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 18/27] pinctrl: replace devm_ioremap_nocache with devm_ioremap
  2017-12-23 11:00 [PATCH v3 18/27] pinctrl: replace devm_ioremap_nocache with devm_ioremap Yisheng Xie
@ 2018-01-02  8:43 ` Linus Walleij
  2018-01-03  6:15   ` Yisheng Xie
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2018-01-02  8:43 UTC (permalink / raw)
  To: Yisheng Xie; +Cc: linux-kernel@vger.kernel.org, Greg KH, ysxie, linux-gpio

On Sat, Dec 23, 2017 at 12:00 PM, 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 18/27] pinctrl: replace devm_ioremap_nocache with devm_ioremap
  2018-01-02  8:43 ` Linus Walleij
@ 2018-01-03  6:15   ` Yisheng Xie
  2018-01-03  7:49     ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Yisheng Xie @ 2018-01-03  6:15 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel@vger.kernel.org, Greg KH, ysxie, linux-gpio



On 2018/1/2 16:43, Linus Walleij wrote:
> On Sat, Dec 23, 2017 at 12:00 PM, 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.

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/pinctrl/bcm/pinctrl-ns2-mux.c         | 2 +-		arm/arm64
 drivers/pinctrl/bcm/pinctrl-nsp-mux.c         | 4 ++--		arm
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 2 +-		arm
 drivers/pinctrl/pinctrl-amd.c                 | 4 ++--		x86/arm

Thanks
Yisheng
> 
> Yours,
> Linus Walleij
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 18/27] pinctrl: replace devm_ioremap_nocache with devm_ioremap
  2018-01-03  6:15   ` Yisheng Xie
@ 2018-01-03  7:49     ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2018-01-03  7:49 UTC (permalink / raw)
  To: Yisheng Xie; +Cc: linux-kernel@vger.kernel.org, Greg KH, ysxie, linux-gpio

On Wed, Jan 3, 2018 at 7:15 AM, Yisheng Xie <xieyisheng1@huawei.com> wrote:
> On 2018/1/2 16:43, Linus Walleij wrote:
>> On Sat, Dec 23, 2017 at 12:00 PM, 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.
>
> 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.

Yeah, same comment as the GPIO patch.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-03  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-23 11:00 [PATCH v3 18/27] pinctrl: replace devm_ioremap_nocache with devm_ioremap Yisheng Xie
2018-01-02  8:43 ` Linus Walleij
2018-01-03  6:15   ` Yisheng Xie
2018-01-03  7:49     ` 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).