* [PATCH -next] pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe()
@ 2016-07-12 14:19 weiyj_lk at 163.com
2016-07-12 17:06 ` Ray Jui
2016-07-22 14:38 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk at 163.com @ 2016-07-12 14:19 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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 <yongjun_wei@trendmicro.com.cn>
---
drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
index 7e5f7b7..ca81789 100644
--- a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
@@ -1044,10 +1044,8 @@ static int ns2_pinmux_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pinctrl->base0 = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(pinctrl->base0)) {
- dev_err(&pdev->dev, "unable to map I/O space\n");
+ if (IS_ERR(pinctrl->base0))
return PTR_ERR(pinctrl->base0);
- }
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
pinctrl->base1 = devm_ioremap_nocache(&pdev->dev, res->start,
@@ -1059,10 +1057,8 @@ static int ns2_pinmux_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
pinctrl->pinconf_base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(pinctrl->pinconf_base)) {
- dev_err(&pdev->dev, "unable to map I/O space\n");
+ if (IS_ERR(pinctrl->pinconf_base))
return PTR_ERR(pinctrl->pinconf_base);
- }
ret = ns2_mux_log_init(pinctrl);
if (ret) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH -next] pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe()
2016-07-12 14:19 [PATCH -next] pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe() weiyj_lk at 163.com
@ 2016-07-12 17:06 ` Ray Jui
2016-07-22 14:38 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Ray Jui @ 2016-07-12 17:06 UTC (permalink / raw)
To: linux-arm-kernel
Hi Wei,
On 7/12/2016 7:19 AM, weiyj_lk at 163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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 <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
> index 7e5f7b7..ca81789 100644
> --- a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
> +++ b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
> @@ -1044,10 +1044,8 @@ static int ns2_pinmux_probe(struct platform_device *pdev)
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> pinctrl->base0 = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(pinctrl->base0)) {
> - dev_err(&pdev->dev, "unable to map I/O space\n");
> + if (IS_ERR(pinctrl->base0))
> return PTR_ERR(pinctrl->base0);
> - }
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> pinctrl->base1 = devm_ioremap_nocache(&pdev->dev, res->start,
> @@ -1059,10 +1057,8 @@ static int ns2_pinmux_probe(struct platform_device *pdev)
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> pinctrl->pinconf_base = devm_ioremap_resource(&pdev->dev, res);
> - if (IS_ERR(pinctrl->pinconf_base)) {
> - dev_err(&pdev->dev, "unable to map I/O space\n");
> + if (IS_ERR(pinctrl->pinconf_base))
> return PTR_ERR(pinctrl->pinconf_base);
> - }
>
> ret = ns2_mux_log_init(pinctrl);
> if (ret) {
>
>
>
>
Looks good to me! Thanks.
Acked-by: Ray Jui <ray.jui@broadcom.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH -next] pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe()
2016-07-12 14:19 [PATCH -next] pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe() weiyj_lk at 163.com
2016-07-12 17:06 ` Ray Jui
@ 2016-07-22 14:38 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-07-22 14:38 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 12, 2016 at 4:19 PM, <weiyj_lk@163.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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 <yongjun_wei@trendmicro.com.cn>
Patch applied with Ray's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-22 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 14:19 [PATCH -next] pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe() weiyj_lk at 163.com
2016-07-12 17:06 ` Ray Jui
2016-07-22 14:38 ` 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).