linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe()
@ 2020-04-03  1:57 Tang Bin
  2020-04-03  7:44 ` Neil Armstrong
  0 siblings, 1 reply; 3+ messages in thread
From: Tang Bin @ 2020-04-03  1:57 UTC (permalink / raw)
  To: clabbe, herbert, davem, narmstrong
  Cc: linux-crypto, linux-amlogic, linux-kernel, Tang Bin

In this place, when something goes wrong, platform_get_irq() will
print an error message, so in order to avoid the situation of repeat
output,we should remove dev_err here.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/crypto/amlogic/amlogic-gxl-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
index 9d4ead2f7..411857fad 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-core.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
@@ -253,10 +253,8 @@ static int meson_crypto_probe(struct platform_device *pdev)
 	mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL);
 	for (i = 0; i < MAXFLOW; i++) {
 		mc->irqs[i] = platform_get_irq(pdev, i);
-		if (mc->irqs[i] < 0) {
-			dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
+		if (mc->irqs[i] < 0)
 			return mc->irqs[i];
-		}
 
 		err = devm_request_irq(&pdev->dev, mc->irqs[i], meson_irq_handler, 0,
 				       "gxl-crypto", mc);
-- 
2.20.1.windows.1




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

* Re: [PATCH] crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe()
  2020-04-03  1:57 [PATCH] crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe() Tang Bin
@ 2020-04-03  7:44 ` Neil Armstrong
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2020-04-03  7:44 UTC (permalink / raw)
  To: Tang Bin, clabbe, herbert, davem
  Cc: linux-amlogic, linux-crypto, linux-kernel

Subject should be: "[PATCH v3] crypto:amlogic: Delete duplicate dev_err in meson_crypto_probe()"

So for the next send, it will be "[PATCH v3] crypto: amlogic: ..."

On 03/04/2020 03:57, Tang Bin wrote:
> In this place, when something goes wrong, platform_get_irq() will
> print an error message, so in order to avoid the situation of repeat
> output,we should remove dev_err here.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  drivers/crypto/amlogic/amlogic-gxl-core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
> index 9d4ead2f7..411857fad 100644
> --- a/drivers/crypto/amlogic/amlogic-gxl-core.c
> +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
> @@ -253,10 +253,8 @@ static int meson_crypto_probe(struct platform_device *pdev)
>  	mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL);
>  	for (i = 0; i < MAXFLOW; i++) {
>  		mc->irqs[i] = platform_get_irq(pdev, i);
> -		if (mc->irqs[i] < 0) {
> -			dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
> +		if (mc->irqs[i] < 0)
>  			return mc->irqs[i];
> -		}
>  
>  		err = devm_request_irq(&pdev->dev, mc->irqs[i], meson_irq_handler, 0,
>  				       "gxl-crypto", mc);
> 

This is better.

With the subject fixed, it will be ok.

Neil

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

* Re: [PATCH] crypto: amlogic - Delete duplicate dev_err in meson_crypto_probe()
@ 2020-04-03  8:45 Markus Elfring
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2020-04-03  8:45 UTC (permalink / raw)
  To: Tang Bin, linux-amlogic, linux-crypto
  Cc: linux-kernel, kernel-janitors, Corentin Labbe, David S. Miller,
	Herbert Xu, Neil Armstrong

> In this place,

I suggest to omit such a wording from the change description.


> when something goes wrong, platform_get_irq() will
> print an error message,

This information is helpful here.


> so in order to avoid the situation of repeat output,

Possible adjustments:
* Separate sentences

* “repeated output”


> we should remove dev_err here.

Thus remove a redundant function call.


How do you think about to change any more source files in a systematic way?

Regards,
Markus

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

end of thread, other threads:[~2020-04-03  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03  1:57 [PATCH] crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe() Tang Bin
2020-04-03  7:44 ` Neil Armstrong
2020-04-03  8:45 [PATCH] crypto: amlogic " Markus Elfring

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