linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto:amlogic - use platform_get_irq_optional()
@ 2020-04-02 11:33 Tang Bin
  2020-04-02 13:26 ` Neil Armstrong
  0 siblings, 1 reply; 3+ messages in thread
From: Tang Bin @ 2020-04-02 11:33 UTC (permalink / raw)
  To: clabbe, herbert, davem
  Cc: linux-crypto, linux-amlogic, linux-kernel, Tang Bin

In order to simply code,because platform_get_irq() already has
dev_err() message.

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

diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
index 9d4ead2f7..37901bd81 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-core.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
@@ -252,7 +252,7 @@ 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);
+		mc->irqs[i] = platform_get_irq_optional(pdev, i);
 		if (mc->irqs[i] < 0) {
 			dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
 			return mc->irqs[i];
-- 
2.20.1.windows.1




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

* Re: [PATCH] crypto:amlogic - use platform_get_irq_optional()
  2020-04-02 11:33 [PATCH] crypto:amlogic - use platform_get_irq_optional() Tang Bin
@ 2020-04-02 13:26 ` Neil Armstrong
       [not found]   ` <202004022329105659148@cmss.chinamobile.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Armstrong @ 2020-04-02 13:26 UTC (permalink / raw)
  To: Tang Bin, clabbe, herbert, davem
  Cc: linux-amlogic, linux-crypto, linux-kernel

Hi,

On 02/04/2020 13:33, Tang Bin wrote:
> In order to simply code,because platform_get_irq() already has
> dev_err() message.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  drivers/crypto/amlogic/amlogic-gxl-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
> index 9d4ead2f7..37901bd81 100644
> --- a/drivers/crypto/amlogic/amlogic-gxl-core.c
> +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
> @@ -252,7 +252,7 @@ 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);
> +		mc->irqs[i] = platform_get_irq_optional(pdev, i);
>  		if (mc->irqs[i] < 0) {
>  			dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
>  			return mc->irqs[i];
> 

NACK, the irq is not optional, I don't see why platform_get_irq_optional() should be used here
and how it could "simply code".

Neil

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

* Re: [PATCH] crypto:amlogic - use platform_get_irq_optional()
       [not found]   ` <202004022329105659148@cmss.chinamobile.com>
@ 2020-04-02 15:35     ` Neil Armstrong
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2020-04-02 15:35 UTC (permalink / raw)
  To: tangbin, clabbe, herbert, davem; +Cc: linux-amlogic, linux-crypto, linux-kernel

Hi,

On 02/04/2020 17:29, tangbin@cmss.chinamobile.com wrote:
> Dear Neil:
>         Thank you for your replay,maybe my description is not so clear。What I want to say is:In this place, when something goes wrong, platform_get_irq() will print an error message, and this function will print both,so if we want to avoid the situation of repeat output,we can remove dev_err() here or use platform_get_irq_optional()  instead of platform_get_irq()。Thank you very much。

Please do not top-post.

Since the irq is not optional, removing the dev_err() is the right way to go.

Neil

> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
>      
>     *From:* Neil Armstrong <mailto:narmstrong@baylibre.com>
>     *Date:* 2020-04-02 21:26
>     *To:* Tang Bin <mailto:tangbin@cmss.chinamobile.com>; clabbe <mailto:clabbe@baylibre.com>; herbert <mailto:herbert@gondor.apana.org.au>; davem <mailto:davem@davemloft.net>
>     *CC:* linux-amlogic <mailto:linux-amlogic@lists.infradead.org>; linux-crypto <mailto:linux-crypto@vger.kernel.org>; linux-kernel <mailto:linux-kernel@vger.kernel.org>
>     *Subject:* Re: [PATCH] crypto:amlogic - use platform_get_irq_optional()
>     Hi,
>      
>     On 02/04/2020 13:33, Tang Bin wrote:
>     > In order to simply code,because platform_get_irq() already has
>     > dev_err() message.
>     >
>     > Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
>     > ---
>     >  drivers/crypto/amlogic/amlogic-gxl-core.c | 2 +-
>     >  1 file changed, 1 insertion(+), 1 deletion(-)
>     >
>     > diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
>     > index 9d4ead2f7..37901bd81 100644
>     > --- a/drivers/crypto/amlogic/amlogic-gxl-core.c
>     > +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
>     > @@ -252,7 +252,7 @@ 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);
>     > + mc->irqs[i] = platform_get_irq_optional(pdev, i);
>     >  if (mc->irqs[i] < 0) {
>     >  dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
>     >  return mc->irqs[i];
>     >
>      
>     NACK, the irq is not optional, I don't see why platform_get_irq_optional() should be used here
>     and how it could "simply code".
>      
>     Neil
> 


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

end of thread, other threads:[~2020-04-02 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 11:33 [PATCH] crypto:amlogic - use platform_get_irq_optional() Tang Bin
2020-04-02 13:26 ` Neil Armstrong
     [not found]   ` <202004022329105659148@cmss.chinamobile.com>
2020-04-02 15:35     ` Neil Armstrong

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