* [PATCH v3 21/27] watchdog: replace devm_ioremap_nocache with devm_ioremap
@ 2017-12-23 11:01 Yisheng Xie
2017-12-26 17:28 ` [v3,21/27] " Guenter Roeck
0 siblings, 1 reply; 3+ messages in thread
From: Yisheng Xie @ 2017-12-23 11:01 UTC (permalink / raw)
To: linux-kernel, gregkh
Cc: ysxie, Yisheng Xie, Wim Van Sebroeck, Guenter Roeck, linux-watchdog
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: Wim Van Sebroeck <wim@iguana.be>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
---
drivers/watchdog/bcm63xx_wdt.c | 4 ++--
drivers/watchdog/rc32434_wdt.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c
index 8555afc..697a7e7 100644
--- a/drivers/watchdog/bcm63xx_wdt.c
+++ b/drivers/watchdog/bcm63xx_wdt.c
@@ -248,8 +248,8 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev)
return -ENODEV;
}
- bcm63xx_wdt_device.regs = devm_ioremap_nocache(&pdev->dev, r->start,
- resource_size(r));
+ bcm63xx_wdt_device.regs = devm_ioremap(&pdev->dev, r->start,
+ resource_size(r));
if (!bcm63xx_wdt_device.regs) {
dev_err(&pdev->dev, "failed to remap I/O resources\n");
return -ENXIO;
diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c
index 3a75f3b..7d519c5 100644
--- a/drivers/watchdog/rc32434_wdt.c
+++ b/drivers/watchdog/rc32434_wdt.c
@@ -31,7 +31,7 @@
#include <linux/platform_device.h> /* For platform_driver framework */
#include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
-#include <linux/io.h> /* For devm_ioremap_nocache */
+#include <linux/io.h> /* For devm_ioremap */
#include <asm/mach-rc32434/integ.h> /* For the Watchdog registers */
@@ -271,7 +271,7 @@ static int rc32434_wdt_probe(struct platform_device *pdev)
return -ENODEV;
}
- wdt_reg = devm_ioremap_nocache(&pdev->dev, r->start, resource_size(r));
+ wdt_reg = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!wdt_reg) {
pr_err("failed to remap I/O resources\n");
return -ENXIO;
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v3,21/27] watchdog: replace devm_ioremap_nocache with devm_ioremap
2017-12-23 11:01 [PATCH v3 21/27] watchdog: replace devm_ioremap_nocache with devm_ioremap Yisheng Xie
@ 2017-12-26 17:28 ` Guenter Roeck
2017-12-27 9:36 ` Yisheng Xie
0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2017-12-26 17:28 UTC (permalink / raw)
To: Yisheng Xie; +Cc: linux-kernel, gregkh, ysxie, Wim Van Sebroeck, linux-watchdog
On Sat, Dec 23, 2017 at 07:01:37PM +0800, 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.
>
I don't have issues with the patch itself - on mips, the definitions
_are_ the same - but with the description. It is not universally correct
that the definitions are the same. Please update and resubmit.
Guenter
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-watchdog@vger.kernel.org
> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
> ---
> drivers/watchdog/bcm63xx_wdt.c | 4 ++--
> drivers/watchdog/rc32434_wdt.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c
> index 8555afc..697a7e7 100644
> --- a/drivers/watchdog/bcm63xx_wdt.c
> +++ b/drivers/watchdog/bcm63xx_wdt.c
> @@ -248,8 +248,8 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev)
> return -ENODEV;
> }
>
> - bcm63xx_wdt_device.regs = devm_ioremap_nocache(&pdev->dev, r->start,
> - resource_size(r));
> + bcm63xx_wdt_device.regs = devm_ioremap(&pdev->dev, r->start,
> + resource_size(r));
> if (!bcm63xx_wdt_device.regs) {
> dev_err(&pdev->dev, "failed to remap I/O resources\n");
> return -ENXIO;
> diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c
> index 3a75f3b..7d519c5 100644
> --- a/drivers/watchdog/rc32434_wdt.c
> +++ b/drivers/watchdog/rc32434_wdt.c
> @@ -31,7 +31,7 @@
> #include <linux/platform_device.h> /* For platform_driver framework */
> #include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */
> #include <linux/uaccess.h> /* For copy_to_user/put_user/... */
> -#include <linux/io.h> /* For devm_ioremap_nocache */
> +#include <linux/io.h> /* For devm_ioremap */
>
> #include <asm/mach-rc32434/integ.h> /* For the Watchdog registers */
>
> @@ -271,7 +271,7 @@ static int rc32434_wdt_probe(struct platform_device *pdev)
> return -ENODEV;
> }
>
> - wdt_reg = devm_ioremap_nocache(&pdev->dev, r->start, resource_size(r));
> + wdt_reg = devm_ioremap(&pdev->dev, r->start, resource_size(r));
> if (!wdt_reg) {
> pr_err("failed to remap I/O resources\n");
> return -ENXIO;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v3,21/27] watchdog: replace devm_ioremap_nocache with devm_ioremap
2017-12-26 17:28 ` [v3,21/27] " Guenter Roeck
@ 2017-12-27 9:36 ` Yisheng Xie
0 siblings, 0 replies; 3+ messages in thread
From: Yisheng Xie @ 2017-12-27 9:36 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-kernel, gregkh, ysxie, Wim Van Sebroeck, linux-watchdog
Hi Guenter,
On 2017/12/27 1:28, Guenter Roeck wrote:
> On Sat, Dec 23, 2017 at 07:01:37PM +0800, 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.
>> >
> I don't have issues with the patch itself - on mips, the definitions
> _are_ the same - but with the description. It is not universally correct
> that the definitions are the same. Please update and resubmit.
>
Right, there are 4 archs have different meaning of ioremap. And presently, I
still do not know why.
For this patch itself, maybe I can update and resubmit.
Thanks and Merry Christmas.
Yisheng
> Guenter
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-27 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-23 11:01 [PATCH v3 21/27] watchdog: replace devm_ioremap_nocache with devm_ioremap Yisheng Xie
2017-12-26 17:28 ` [v3,21/27] " Guenter Roeck
2017-12-27 9:36 ` Yisheng Xie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®