linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next,resend] EDAC/armada_xp: Remove redundant dev_err call in axp_mc_probe() and aurora_l2_probe()
@ 2021-06-08  8:47 ChenXiaoSong
  2021-06-08  9:53 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: ChenXiaoSong @ 2021-06-08  8:47 UTC (permalink / raw)
  To: jlu, bp, mchehab, tony.luck
  Cc: linux-edac, linux-kernel, yukuai3, yi.zhang, chenxiaosong2

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
---
 drivers/edac/armada_xp_edac.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/edac/armada_xp_edac.c b/drivers/edac/armada_xp_edac.c
index e3e757513d1b..9661c72e6554 100644
--- a/drivers/edac/armada_xp_edac.c
+++ b/drivers/edac/armada_xp_edac.c
@@ -297,10 +297,8 @@ static int axp_mc_probe(struct platform_device *pdev)
 	}
 
 	base = devm_ioremap_resource(&pdev->dev, r);
-	if (IS_ERR(base)) {
-		dev_err(&pdev->dev, "Unable to map regs\n");
+	if (IS_ERR(base))
 		return PTR_ERR(base);
-	}
 
 	config = readl(base + SDRAM_CONFIG_REG);
 	if (!(config & SDRAM_CONFIG_ECC_MASK)) {
@@ -525,10 +523,8 @@ static int aurora_l2_probe(struct platform_device *pdev)
 	}
 
 	base = devm_ioremap_resource(&pdev->dev, r);
-	if (IS_ERR(base)) {
-		dev_err(&pdev->dev, "Unable to map regs\n");
+	if (IS_ERR(base))
 		return PTR_ERR(base);
-	}
 
 	l2x0_aux_ctrl = readl(base + L2X0_AUX_CTRL);
 	if (!(l2x0_aux_ctrl & AURORA_ACR_PARITY_EN))
--
2.25.4


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

* Re: [PATCH -next,resend] EDAC/armada_xp: Remove redundant dev_err call in axp_mc_probe() and aurora_l2_probe()
  2021-06-08  8:47 [PATCH -next,resend] EDAC/armada_xp: Remove redundant dev_err call in axp_mc_probe() and aurora_l2_probe() ChenXiaoSong
@ 2021-06-08  9:53 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2021-06-08  9:53 UTC (permalink / raw)
  To: ChenXiaoSong
  Cc: jlu, mchehab, tony.luck, linux-edac, linux-kernel, yukuai3, yi.zhang

On Tue, Jun 08, 2021 at 04:47:15PM +0800, ChenXiaoSong wrote:
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
> ---
>  drivers/edac/armada_xp_edac.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/edac/armada_xp_edac.c b/drivers/edac/armada_xp_edac.c
> index e3e757513d1b..9661c72e6554 100644
> --- a/drivers/edac/armada_xp_edac.c
> +++ b/drivers/edac/armada_xp_edac.c
> @@ -297,10 +297,8 @@ static int axp_mc_probe(struct platform_device *pdev)
>  	}
>  
>  	base = devm_ioremap_resource(&pdev->dev, r);
> -	if (IS_ERR(base)) {
> -		dev_err(&pdev->dev, "Unable to map regs\n");
> +	if (IS_ERR(base))
>  		return PTR_ERR(base);
> -	}
>  
>  	config = readl(base + SDRAM_CONFIG_REG);
>  	if (!(config & SDRAM_CONFIG_ECC_MASK)) {
> @@ -525,10 +523,8 @@ static int aurora_l2_probe(struct platform_device *pdev)
>  	}
>  
>  	base = devm_ioremap_resource(&pdev->dev, r);
> -	if (IS_ERR(base)) {
> -		dev_err(&pdev->dev, "Unable to map regs\n");
> +	if (IS_ERR(base))
>  		return PTR_ERR(base);
> -	}
>  
>  	l2x0_aux_ctrl = readl(base + L2X0_AUX_CTRL);
>  	if (!(l2x0_aux_ctrl & AURORA_ACR_PARITY_EN))
> --

https://lkml.kernel.org/r/YLT7JOR3fND5Y3K2@zn.tnic

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

end of thread, other threads:[~2021-06-08  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08  8:47 [PATCH -next,resend] EDAC/armada_xp: Remove redundant dev_err call in axp_mc_probe() and aurora_l2_probe() ChenXiaoSong
2021-06-08  9:53 ` Borislav Petkov

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