2013-06-26 01:57:17

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] PM / AVS: SmartReflex: remove redundant dev_err call in omap_sr_probe()

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/power/avs/smartreflex.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index db9973b..c26acfc 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -871,10 +871,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
- if (IS_ERR(sr_info->base)) {
- dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
+ if (IS_ERR(sr_info->base))
return PTR_ERR(sr_info->base);
- }

irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);


2013-06-26 13:07:25

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH -next] PM / AVS: SmartReflex: remove redundant dev_err call in omap_sr_probe()

On 09:57-20130626, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/power/avs/smartreflex.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
> index db9973b..c26acfc 100644
> --- a/drivers/power/avs/smartreflex.c
> +++ b/drivers/power/avs/smartreflex.c
> @@ -871,10 +871,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
> - if (IS_ERR(sr_info->base)) {
> - dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
> + if (IS_ERR(sr_info->base))
> return PTR_ERR(sr_info->base);
> - }
>
> irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>
>
Acked-by: Nishanth Menon <[email protected]>
--
Regards,
Nishanth Menon

2013-06-29 01:47:21

by Anton Vorontsov

[permalink] [raw]
Subject: Re: [PATCH -next] PM / AVS: SmartReflex: remove redundant dev_err call in omap_sr_probe()

On Wed, Jun 26, 2013 at 09:57:14AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---

The patch does not apply to the battery-2.6.git tree... :-/

(In the patch I see "sr_info", but in the current driver there is just
"sr".)

> drivers/power/avs/smartreflex.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
> index db9973b..c26acfc 100644
> --- a/drivers/power/avs/smartreflex.c
> +++ b/drivers/power/avs/smartreflex.c
> @@ -871,10 +871,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
>
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
> - if (IS_ERR(sr_info->base)) {
> - dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
> + if (IS_ERR(sr_info->base))
> return PTR_ERR(sr_info->base);
> - }
>
> irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>
>