Skip to contentSkip to conversation

crypto: aspeed - Remove redundant dev_err call

PATCH In review Shang XiaoJing 3 participants 5 messages Sep 23, 2022 – Sep 30, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: aspeed - Remove redundant dev_err call

devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message.

---
 drivers/crypto/aspeed/aspeed-hace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/crypto/aspeed/aspeed-hace.c +1 -3
index 3f880aafb6a2..e05c32c31842 100644
@@ -123,10 +123,8 @@ static int aspeed_hace_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, hace_dev);
 
 	hace_dev->regs = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(hace_dev->regs)) {
-		dev_err(&pdev->dev, "Failed to map resources\n");
+	if (IS_ERR(hace_dev->regs))
 		return PTR_ERR(hace_dev->regs);
-	}
 
 	/* Get irq number and register it */
 	hace_dev->irq = platform_get_irq(pdev, 0);
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 25 lines

devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message.

---
 drivers/crypto/aspeed/aspeed-hace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/crypto/aspeed/aspeed-hace.c +1 -3
index 3f880aafb6a2..e05c32c31842 100644
@@ -123,10 +123,8 @@ static int aspeed_hace_probe(struct platform_device
 *pdev)
 	platform_set_drvdata(pdev, hace_dev);
 
 	hace_dev->regs = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(hace_dev->regs)) {
-		dev_err(&pdev->dev, "Failed to map resources\n");
+	if (IS_ERR(hace_dev->regs))
 		return PTR_ERR(hace_dev->regs);
-	}
 
 	/* Get irq number and register it */
Quoted 3 lines

hace_dev->irq = platform_get_irq(pdev, 0);
--
2.17.1

Similar patch just be proposed few days ago.
https://patchwork.kernel.org/project/linux-crypto/patch/20220920032118.6440-1-yuehaibing at huawei.com/

#2 lore raw
Quoted 24 lines · Neal Liu
Quoted 24 lines

devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message.

---
  drivers/crypto/aspeed/aspeed-hace.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
drivers/crypto/aspeed/aspeed-hace.c +1 -3
index 3f880aafb6a2..e05c32c31842 100644
@@ -123,10 +123,8 @@ static int aspeed_hace_probe(struct platform_device
 *pdev)
  	platform_set_drvdata(pdev, hace_dev);
 
  	hace_dev->regs = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(hace_dev->regs)) {
-		dev_err(&pdev->dev, "Failed to map resources\n");
+	if (IS_ERR(hace_dev->regs))
  		return PTR_ERR(hace_dev->regs);
-	}
 
Quoted 6 lines
Quoted 4 lines
drivers/crypto/aspeed/aspeed-hace.c +0 -0
  	/* Get irq number and register it */

hace_dev->irq = platform_get_irq(pdev, 0);
--
2.17.1

Similar patch just be proposed few days ago.
https://patchwork.kernel.org/project/linux-crypto/patch/20220920032118.6440-1-yuehaibing at huawei.com/

sorry, pls ignore mine.

Thanks,

Shang XiaoJing

maintainer
#3 lore raw
Quoted 26 lines · shangxiaojing
Quoted 24 lines · Neal Liu
Quoted 24 lines

devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message.

---
  drivers/crypto/aspeed/aspeed-hace.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
drivers/crypto/aspeed/aspeed-hace.c +1 -3
index 3f880aafb6a2..e05c32c31842 100644
@@ -123,10 +123,8 @@ static int aspeed_hace_probe(struct platform_device
 *pdev)
  	platform_set_drvdata(pdev, hace_dev);
 
  	hace_dev->regs = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(hace_dev->regs)) {
-		dev_err(&pdev->dev, "Failed to map resources\n");
+	if (IS_ERR(hace_dev->regs))
  		return PTR_ERR(hace_dev->regs);
-	}
 
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
drivers/crypto/aspeed/aspeed-hace.c +0 -0
  	/* Get irq number and register it */

hace_dev->irq = platform_get_irq(pdev, 0);
--
2.17.1

Similar patch just be proposed few days ago.
https://patchwork.kernel.org/project/linux-crypto/patch/20220920032118.6440-1-yuehaibing at huawei.com/

sorry, pls ignore mine.

Actually I think these two patches are different and both can be applied.

Cheers,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer
#4 lore raw
In reply to Shang XiaoJing
Quoted 7 lines · Shang XiaoJing

devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message.

---
 drivers/crypto/aspeed/aspeed-hace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt