linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe()
@ 2017-02-08 16:23 Wei Yongjun
  2017-02-09  8:50 ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2017-02-08 16:23 UTC (permalink / raw)
  To: Cyrille Pitchen, Marek Vasut, David Woodhouse, Brian Norris,
	Boris Brezillon, Richard Weinberger
  Cc: Wei Yongjun, linux-mtd, linux-kernel

From: Wei Yongjun <weiyongjun1@huawei.com>

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 <weiyongjun1@huawei.com>
---
 drivers/mtd/spi-nor/aspeed-smc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
index 7c86099..56051d3 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -723,17 +723,13 @@ static int aspeed_smc_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	controller->regs = devm_ioremap_resource(dev, res);
-	if (IS_ERR(controller->regs)) {
-		dev_err(dev, "Cannot remap controller address.\n");
+	if (IS_ERR(controller->regs))
 		return PTR_ERR(controller->regs);
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	controller->ahb_base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(controller->ahb_base)) {
-		dev_err(dev, "Cannot remap controller address.\n");
+	if (IS_ERR(controller->ahb_base))
 		return PTR_ERR(controller->ahb_base);
-	}
 
 	ret = aspeed_smc_setup_flash(controller, np, res);
 	if (ret)

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

* Re: [PATCH -next] mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe()
  2017-02-08 16:23 [PATCH -next] mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe() Wei Yongjun
@ 2017-02-09  8:50 ` Marek Vasut
  2017-02-10 19:20   ` Brian Norris
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2017-02-09  8:50 UTC (permalink / raw)
  To: Wei Yongjun, Cyrille Pitchen, David Woodhouse, Brian Norris,
	Boris Brezillon, Richard Weinberger
  Cc: Wei Yongjun, linux-mtd, linux-kernel

On 02/08/2017 05:23 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> 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 <weiyongjun1@huawei.com>

Reviewed-by: Marek Vasut <marek.vasut@gmail.com>

> ---
>  drivers/mtd/spi-nor/aspeed-smc.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
> index 7c86099..56051d3 100644
> --- a/drivers/mtd/spi-nor/aspeed-smc.c
> +++ b/drivers/mtd/spi-nor/aspeed-smc.c
> @@ -723,17 +723,13 @@ static int aspeed_smc_probe(struct platform_device *pdev)
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	controller->regs = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(controller->regs)) {
> -		dev_err(dev, "Cannot remap controller address.\n");
> +	if (IS_ERR(controller->regs))
>  		return PTR_ERR(controller->regs);
> -	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>  	controller->ahb_base = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(controller->ahb_base)) {
> -		dev_err(dev, "Cannot remap controller address.\n");
> +	if (IS_ERR(controller->ahb_base))
>  		return PTR_ERR(controller->ahb_base);
> -	}
>  
>  	ret = aspeed_smc_setup_flash(controller, np, res);
>  	if (ret)
> 
> 
> 


-- 
Best regards,
Marek Vasut

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

* Re: [PATCH -next] mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe()
  2017-02-09  8:50 ` Marek Vasut
@ 2017-02-10 19:20   ` Brian Norris
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Norris @ 2017-02-10 19:20 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Wei Yongjun, Cyrille Pitchen, David Woodhouse, Boris Brezillon,
	Richard Weinberger, Wei Yongjun, linux-mtd, linux-kernel

On Thu, Feb 09, 2017 at 09:50:23AM +0100, Marek Vasut wrote:
> On 02/08/2017 05:23 PM, Wei Yongjun wrote:
> > From: Wei Yongjun <weiyongjun1@huawei.com>
> > 
> > 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 <weiyongjun1@huawei.com>
> 
> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>

The driver is new for 4.11, so I'll just take this now, directly.
Applied to l2-mtd.git.

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

end of thread, other threads:[~2017-02-10 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 16:23 [PATCH -next] mtd: aspeed: remove redundant dev_err call in aspeed_smc_probe() Wei Yongjun
2017-02-09  8:50 ` Marek Vasut
2017-02-10 19:20   ` Brian Norris

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).