2021-04-07 21:03:07

by YueHaibing

[permalink] [raw]
Subject: [PATCH -next 0/5] Remove redundant dev_err call

This patchset remove some redundant dev_err calls

YueHaibing (5):
crypto: atmel-tdes - Remove redundant dev_err call in
atmel_tdes_probe()
crypto: img-hash - Remove redundant dev_err call in img_hash_probe()
crypto: ux500 - Remove redundant dev_err calls
crypto: keembay - Remove redundant dev_err calls
crypto: ccree - Remove redundant dev_err call in init_cc_resources()

drivers/crypto/atmel-tdes.c | 1 -
drivers/crypto/ccree/cc_driver.c | 4 +---
drivers/crypto/img-hash.c | 3 ---
drivers/crypto/keembay/keembay-ocs-aes-core.c | 4 +---
drivers/crypto/keembay/keembay-ocs-hcu-core.c | 4 +---
drivers/crypto/ux500/cryp/cryp_core.c | 1 -
drivers/crypto/ux500/hash/hash_core.c | 1 -
7 files changed, 3 insertions(+), 15 deletions(-)

--
2.17.1


2021-04-07 21:03:09

by YueHaibing

[permalink] [raw]
Subject: [PATCH -next 1/5] crypto: atmel-tdes - Remove redundant dev_err call in atmel_tdes_probe()

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

Signed-off-by: YueHaibing <[email protected]>
---
drivers/crypto/atmel-tdes.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
index 4d63cb13a54f..6f01c51e3c37 100644
--- a/drivers/crypto/atmel-tdes.c
+++ b/drivers/crypto/atmel-tdes.c
@@ -1217,7 +1217,6 @@ static int atmel_tdes_probe(struct platform_device *pdev)

tdes_dd->io_base = devm_ioremap_resource(&pdev->dev, tdes_res);
if (IS_ERR(tdes_dd->io_base)) {
- dev_err(dev, "can't ioremap\n");
err = PTR_ERR(tdes_dd->io_base);
goto err_tasklet_kill;
}
--
2.17.1

2021-04-07 21:03:56

by YueHaibing

[permalink] [raw]
Subject: [PATCH -next 2/5] crypto: img-hash - Remove redundant dev_err call in img_hash_probe()

devm_platform_ioremap_resource() and devm_ioremap_resource()
will print err msg while failing, so the redundant dev_err call
can be removed.

Signed-off-by: YueHaibing <[email protected]>
---
drivers/crypto/img-hash.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c
index e813115d5432..aa4c7b2af3e2 100644
--- a/drivers/crypto/img-hash.c
+++ b/drivers/crypto/img-hash.c
@@ -963,8 +963,6 @@ static int img_hash_probe(struct platform_device *pdev)
hdev->io_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hdev->io_base)) {
err = PTR_ERR(hdev->io_base);
- dev_err(dev, "can't ioremap, returned %d\n", err);
-
goto res_err;
}

@@ -972,7 +970,6 @@ static int img_hash_probe(struct platform_device *pdev)
hash_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
hdev->cpu_addr = devm_ioremap_resource(dev, hash_res);
if (IS_ERR(hdev->cpu_addr)) {
- dev_err(dev, "can't ioremap write port\n");
err = PTR_ERR(hdev->cpu_addr);
goto res_err;
}
--
2.17.1

2021-04-16 11:43:32

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next 0/5] Remove redundant dev_err call

On Wed, Apr 07, 2021 at 10:18:14PM +0800, YueHaibing wrote:
> This patchset remove some redundant dev_err calls
>
> YueHaibing (5):
> crypto: atmel-tdes - Remove redundant dev_err call in
> atmel_tdes_probe()
> crypto: img-hash - Remove redundant dev_err call in img_hash_probe()
> crypto: ux500 - Remove redundant dev_err calls
> crypto: keembay - Remove redundant dev_err calls
> crypto: ccree - Remove redundant dev_err call in init_cc_resources()
>
> drivers/crypto/atmel-tdes.c | 1 -
> drivers/crypto/ccree/cc_driver.c | 4 +---
> drivers/crypto/img-hash.c | 3 ---
> drivers/crypto/keembay/keembay-ocs-aes-core.c | 4 +---
> drivers/crypto/keembay/keembay-ocs-hcu-core.c | 4 +---
> drivers/crypto/ux500/cryp/cryp_core.c | 1 -
> drivers/crypto/ux500/hash/hash_core.c | 1 -
> 7 files changed, 3 insertions(+), 15 deletions(-)

All applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt