* [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource()
@ 2013-03-04 5:06 Sachin Kamat
2013-03-04 5:06 ` [PATCH 2/4] watchdog: ath79_wdt: " Sachin Kamat
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Sachin Kamat @ 2013-03-04 5:06 UTC (permalink / raw)
To: linux-watchdog; +Cc: wim, thierry.reding, sachin.kamat
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
---
drivers/watchdog/s3c2410_wdt.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index c1a221c..ee03135 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -330,10 +330,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
}
/* get the memory region for the watchdog timer */
- wdt_base = devm_request_and_ioremap(dev, wdt_mem);
- if (wdt_base == NULL) {
- dev_err(dev, "failed to devm_request_and_ioremap() region\n");
- ret = -ENOMEM;
+ wdt_base = devm_ioremap_resource(dev, wdt_mem);
+ if (IS_ERR(wdt_base)) {
+ ret = PTR_ERR(wdt_base);
goto err;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] watchdog: ath79_wdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource() Sachin Kamat
@ 2013-03-04 5:06 ` Sachin Kamat
2013-03-04 6:53 ` Thierry Reding
2013-03-04 5:06 ` [PATCH 3/4] watchdog: davinci_wdt: " Sachin Kamat
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2013-03-04 5:06 UTC (permalink / raw)
To: linux-watchdog; +Cc: wim, thierry.reding, sachin.kamat, Gabor Juhos
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Gabor Juhos <juhosg@openwrt.org>
---
drivers/watchdog/ath79_wdt.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c
index 8987990..d184c48 100644
--- a/drivers/watchdog/ath79_wdt.c
+++ b/drivers/watchdog/ath79_wdt.c
@@ -253,11 +253,9 @@ static int ath79_wdt_probe(struct platform_device *pdev)
return -EINVAL;
}
- wdt_base = devm_request_and_ioremap(&pdev->dev, res);
- if (!wdt_base) {
- dev_err(&pdev->dev, "unable to remap memory region\n");
- return -ENOMEM;
- }
+ wdt_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(wdt_base))
+ return PTR_ERR(wdt_base);
wdt_clk = devm_clk_get(&pdev->dev, "wdt");
if (IS_ERR(wdt_clk))
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] watchdog: davinci_wdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource() Sachin Kamat
2013-03-04 5:06 ` [PATCH 2/4] watchdog: ath79_wdt: " Sachin Kamat
@ 2013-03-04 5:06 ` Sachin Kamat
2013-03-04 6:54 ` Thierry Reding
2013-03-04 5:06 ` [PATCH 4/4] watchdog: shwdt: " Sachin Kamat
2013-03-04 6:53 ` [PATCH 1/4] watchdog: s3c2410_wdt: " Thierry Reding
3 siblings, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2013-03-04 5:06 UTC (permalink / raw)
To: linux-watchdog; +Cc: wim, thierry.reding, sachin.kamat
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/watchdog/davinci_wdt.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 7df1fdc..100d4fb 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -27,6 +27,7 @@
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/slab.h>
+#include <linux/err.h>
#define MODULE_NAME "DAVINCI-WDT: "
@@ -221,11 +222,9 @@ static int davinci_wdt_probe(struct platform_device *pdev)
return -ENOENT;
}
- wdt_base = devm_request_and_ioremap(dev, wdt_mem);
- if (!wdt_base) {
- dev_err(dev, "ioremap failed\n");
- return -EADDRNOTAVAIL;
- }
+ wdt_base = devm_ioremap_resource(dev, wdt_mem);
+ if (IS_ERR(wdt_base))
+ return PTR_ERR(wdt_base);
ret = misc_register(&davinci_wdt_miscdev);
if (ret < 0) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] watchdog: shwdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource() Sachin Kamat
2013-03-04 5:06 ` [PATCH 2/4] watchdog: ath79_wdt: " Sachin Kamat
2013-03-04 5:06 ` [PATCH 3/4] watchdog: davinci_wdt: " Sachin Kamat
@ 2013-03-04 5:06 ` Sachin Kamat
2013-03-04 6:54 ` Thierry Reding
2013-03-04 6:53 ` [PATCH 1/4] watchdog: s3c2410_wdt: " Thierry Reding
3 siblings, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2013-03-04 5:06 UTC (permalink / raw)
To: linux-watchdog; +Cc: wim, thierry.reding, sachin.kamat, Paul Mundt
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Paul Mundt <lethal@linux-sh.org>
---
drivers/watchdog/shwdt.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index 6a89e40..6185af2 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -34,6 +34,7 @@
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <asm/watchdog.h>
#define DRV_NAME "sh-wdt"
@@ -249,9 +250,9 @@ static int sh_wdt_probe(struct platform_device *pdev)
wdt->clk = NULL;
}
- wdt->base = devm_request_and_ioremap(wdt->dev, res);
- if (unlikely(!wdt->base)) {
- rc = -EADDRNOTAVAIL;
+ wdt->base = devm_ioremap_resource(wdt->dev, res);
+ if (IS_ERR(wdt->base)) {
+ rc = PTR_ERR(wdt->base);
goto err;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource() Sachin Kamat
` (2 preceding siblings ...)
2013-03-04 5:06 ` [PATCH 4/4] watchdog: shwdt: " Sachin Kamat
@ 2013-03-04 6:53 ` Thierry Reding
2013-03-11 9:29 ` Sachin Kamat
3 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2013-03-04 6:53 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-watchdog, wim
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
On Mon, Mar 04, 2013 at 10:36:41AM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages; so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Thierry Reding <thierry.reding@avionic-design.de>
> ---
> drivers/watchdog/s3c2410_wdt.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index c1a221c..ee03135 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
> @@ -330,10 +330,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
> }
>
> /* get the memory region for the watchdog timer */
> - wdt_base = devm_request_and_ioremap(dev, wdt_mem);
> - if (wdt_base == NULL) {
> - dev_err(dev, "failed to devm_request_and_ioremap() region\n");
> - ret = -ENOMEM;
> + wdt_base = devm_ioremap_resource(dev, wdt_mem);
> + if (IS_ERR(wdt_base)) {
> + ret = PTR_ERR(wdt_base);
> goto err;
> }
>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] watchdog: ath79_wdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 ` [PATCH 2/4] watchdog: ath79_wdt: " Sachin Kamat
@ 2013-03-04 6:53 ` Thierry Reding
0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2013-03-04 6:53 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-watchdog, wim, Gabor Juhos
[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]
On Mon, Mar 04, 2013 at 10:36:42AM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages; so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Gabor Juhos <juhosg@openwrt.org>
> ---
> drivers/watchdog/ath79_wdt.c | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c
> index 8987990..d184c48 100644
> --- a/drivers/watchdog/ath79_wdt.c
> +++ b/drivers/watchdog/ath79_wdt.c
> @@ -253,11 +253,9 @@ static int ath79_wdt_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> - wdt_base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!wdt_base) {
> - dev_err(&pdev->dev, "unable to remap memory region\n");
> - return -ENOMEM;
> - }
> + wdt_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(wdt_base))
> + return PTR_ERR(wdt_base);
>
> wdt_clk = devm_clk_get(&pdev->dev, "wdt");
> if (IS_ERR(wdt_clk))
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] watchdog: davinci_wdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 ` [PATCH 3/4] watchdog: davinci_wdt: " Sachin Kamat
@ 2013-03-04 6:54 ` Thierry Reding
0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2013-03-04 6:54 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-watchdog, wim
[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]
On Mon, Mar 04, 2013 at 10:36:43AM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages; so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
> drivers/watchdog/davinci_wdt.c | 9 ++++-----
> 1 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> index 7df1fdc..100d4fb 100644
> --- a/drivers/watchdog/davinci_wdt.c
> +++ b/drivers/watchdog/davinci_wdt.c
> @@ -27,6 +27,7 @@
> #include <linux/device.h>
> #include <linux/clk.h>
> #include <linux/slab.h>
> +#include <linux/err.h>
>
> #define MODULE_NAME "DAVINCI-WDT: "
>
> @@ -221,11 +222,9 @@ static int davinci_wdt_probe(struct platform_device *pdev)
> return -ENOENT;
> }
>
> - wdt_base = devm_request_and_ioremap(dev, wdt_mem);
> - if (!wdt_base) {
> - dev_err(dev, "ioremap failed\n");
> - return -EADDRNOTAVAIL;
> - }
> + wdt_base = devm_ioremap_resource(dev, wdt_mem);
> + if (IS_ERR(wdt_base))
> + return PTR_ERR(wdt_base);
>
> ret = misc_register(&davinci_wdt_miscdev);
> if (ret < 0) {
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] watchdog: shwdt: Convert to devm_ioremap_resource()
2013-03-04 5:06 ` [PATCH 4/4] watchdog: shwdt: " Sachin Kamat
@ 2013-03-04 6:54 ` Thierry Reding
0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2013-03-04 6:54 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-watchdog, wim, Paul Mundt
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On Mon, Mar 04, 2013 at 10:36:44AM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages; so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Paul Mundt <lethal@linux-sh.org>
> ---
> drivers/watchdog/shwdt.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
> index 6a89e40..6185af2 100644
> --- a/drivers/watchdog/shwdt.c
> +++ b/drivers/watchdog/shwdt.c
> @@ -34,6 +34,7 @@
> #include <linux/slab.h>
> #include <linux/io.h>
> #include <linux/clk.h>
> +#include <linux/err.h>
> #include <asm/watchdog.h>
>
> #define DRV_NAME "sh-wdt"
> @@ -249,9 +250,9 @@ static int sh_wdt_probe(struct platform_device *pdev)
> wdt->clk = NULL;
> }
>
> - wdt->base = devm_request_and_ioremap(wdt->dev, res);
> - if (unlikely(!wdt->base)) {
> - rc = -EADDRNOTAVAIL;
> + wdt->base = devm_ioremap_resource(wdt->dev, res);
> + if (IS_ERR(wdt->base)) {
> + rc = PTR_ERR(wdt->base);
> goto err;
> }
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource()
2013-03-04 6:53 ` [PATCH 1/4] watchdog: s3c2410_wdt: " Thierry Reding
@ 2013-03-11 9:29 ` Sachin Kamat
2013-03-18 8:44 ` Sachin Kamat
0 siblings, 1 reply; 10+ messages in thread
From: Sachin Kamat @ 2013-03-11 9:29 UTC (permalink / raw)
To: wim; +Cc: linux-watchdog
Hi Wim,
On 4 March 2013 12:23, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> On Mon, Mar 04, 2013 at 10:36:41AM +0530, Sachin Kamat wrote:
>> Use the newly introduced devm_ioremap_resource() instead of
>> devm_request_and_ioremap() which provides more consistent error handling.
>>
>> devm_ioremap_resource() provides its own error messages; so all explicit
>> error messages can be removed from the failure code paths.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> Cc: Thierry Reding <thierry.reding@avionic-design.de>
>> ---
>> drivers/watchdog/s3c2410_wdt.c | 7 +++----
>> 1 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
>> index c1a221c..ee03135 100644
>> --- a/drivers/watchdog/s3c2410_wdt.c
>> +++ b/drivers/watchdog/s3c2410_wdt.c
>> @@ -330,10 +330,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
>> }
>>
>> /* get the memory region for the watchdog timer */
>> - wdt_base = devm_request_and_ioremap(dev, wdt_mem);
>> - if (wdt_base == NULL) {
>> - dev_err(dev, "failed to devm_request_and_ioremap() region\n");
>> - ret = -ENOMEM;
>> + wdt_base = devm_ioremap_resource(dev, wdt_mem);
>> + if (IS_ERR(wdt_base)) {
>> + ret = PTR_ERR(wdt_base);
>> goto err;
>> }
>>
>
> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Did you get a chance to check this series?
Regards,
Sachin.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource()
2013-03-11 9:29 ` Sachin Kamat
@ 2013-03-18 8:44 ` Sachin Kamat
0 siblings, 0 replies; 10+ messages in thread
From: Sachin Kamat @ 2013-03-18 8:44 UTC (permalink / raw)
To: wim, linux-watchdog
On 11 March 2013 14:59, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Hi Wim,
>
> On 4 March 2013 12:23, Thierry Reding <thierry.reding@avionic-design.de> wrote:
>> On Mon, Mar 04, 2013 at 10:36:41AM +0530, Sachin Kamat wrote:
>>> Use the newly introduced devm_ioremap_resource() instead of
>>> devm_request_and_ioremap() which provides more consistent error handling.
>>>
>>> devm_ioremap_resource() provides its own error messages; so all explicit
>>> error messages can be removed from the failure code paths.
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>> Cc: Thierry Reding <thierry.reding@avionic-design.de>
>>> ---
>>> drivers/watchdog/s3c2410_wdt.c | 7 +++----
>>> 1 files changed, 3 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
>>> index c1a221c..ee03135 100644
>>> --- a/drivers/watchdog/s3c2410_wdt.c
>>> +++ b/drivers/watchdog/s3c2410_wdt.c
>>> @@ -330,10 +330,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
>>> }
>>>
>>> /* get the memory region for the watchdog timer */
>>> - wdt_base = devm_request_and_ioremap(dev, wdt_mem);
>>> - if (wdt_base == NULL) {
>>> - dev_err(dev, "failed to devm_request_and_ioremap() region\n");
>>> - ret = -ENOMEM;
>>> + wdt_base = devm_ioremap_resource(dev, wdt_mem);
>>> + if (IS_ERR(wdt_base)) {
>>> + ret = PTR_ERR(wdt_base);
>>> goto err;
>>> }
>>>
>>
>> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
>
> Did you get a chance to check this series?
ping..
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-03-18 8:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 5:06 [PATCH 1/4] watchdog: s3c2410_wdt: Convert to devm_ioremap_resource() Sachin Kamat
2013-03-04 5:06 ` [PATCH 2/4] watchdog: ath79_wdt: " Sachin Kamat
2013-03-04 6:53 ` Thierry Reding
2013-03-04 5:06 ` [PATCH 3/4] watchdog: davinci_wdt: " Sachin Kamat
2013-03-04 6:54 ` Thierry Reding
2013-03-04 5:06 ` [PATCH 4/4] watchdog: shwdt: " Sachin Kamat
2013-03-04 6:54 ` Thierry Reding
2013-03-04 6:53 ` [PATCH 1/4] watchdog: s3c2410_wdt: " Thierry Reding
2013-03-11 9:29 ` Sachin Kamat
2013-03-18 8:44 ` Sachin Kamat
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.