linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: ccp-platform: print error message on platform_get_irq failure
@ 2017-06-30  5:59 Gustavo A. R. Silva
  2017-06-30 15:08 ` Gary R Hook
  2017-07-18 10:36 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30  5:59 UTC (permalink / raw)
  To: Tom Lendacky, Gary Hook, Herbert Xu, David S. Miller
  Cc: linux-crypto, linux-kernel, Gustavo A. R. Silva

Print error message on platform_get_irq failure before return.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/crypto/ccp/ccp-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-platform.c
index e26969e..6020c4a 100644
--- a/drivers/crypto/ccp/ccp-platform.c
+++ b/drivers/crypto/ccp/ccp-platform.c
@@ -66,8 +66,10 @@ static int ccp_get_irq(struct ccp_device *ccp)
 	int ret;
 
 	ret = platform_get_irq(pdev, 0);
-	if (ret < 0)
+	if (ret < 0) {
+		dev_notice(dev, "unable to get IRQ (%d)\n", ret);
 		return ret;
+	}
 
 	ccp->irq = ret;
 	ret = request_irq(ccp->irq, ccp->vdata->perform->irqhandler, 0,
-- 
2.5.0

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

* Re: [PATCH] crypto: ccp-platform: print error message on platform_get_irq failure
  2017-06-30  5:59 [PATCH] crypto: ccp-platform: print error message on platform_get_irq failure Gustavo A. R. Silva
@ 2017-06-30 15:08 ` Gary R Hook
  2017-07-18 10:36 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Gary R Hook @ 2017-06-30 15:08 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Lendacky, Thomas, Herbert Xu,
	David S. Miller
  Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org

On 06/30/2017 12:59 AM, Gustavo A. R. Silva wrote:
> Print error message on platform_get_irq failure before return.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  drivers/crypto/ccp/ccp-platform.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccp/ccp-platform.c
> b/drivers/crypto/ccp/ccp-platform.c
> index e26969e..6020c4a 100644
> --- a/drivers/crypto/ccp/ccp-platform.c
> +++ b/drivers/crypto/ccp/ccp-platform.c
> @@ -66,8 +66,10 @@ static int ccp_get_irq(struct ccp_device *ccp)
>          int ret;
>
>          ret = platform_get_irq(pdev, 0);
> -       if (ret < 0)
> +       if (ret < 0) {
> +               dev_notice(dev, "unable to get IRQ (%d)\n", ret);
>                  return ret;
> +       }

Good find.

I'm all for better and more messages, but I'd like to see more detail 
here, and in the
later dev_notice(). Can we have the messages better reflect the failure 
points?

>
>          ccp->irq = ret;
>          ret = request_irq(ccp->irq, ccp->vdata->perform->irqhandler, 0,
> --
> 2.5.0
>

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

* Re: [PATCH] crypto: ccp-platform: print error message on platform_get_irq failure
  2017-06-30  5:59 [PATCH] crypto: ccp-platform: print error message on platform_get_irq failure Gustavo A. R. Silva
  2017-06-30 15:08 ` Gary R Hook
@ 2017-07-18 10:36 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2017-07-18 10:36 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Tom Lendacky, Gary Hook, David S. Miller, linux-crypto,
	linux-kernel

On Fri, Jun 30, 2017 at 12:59:52AM -0500, Gustavo A. R. Silva wrote:
> Print error message on platform_get_irq failure before return.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2017-07-18 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30  5:59 [PATCH] crypto: ccp-platform: print error message on platform_get_irq failure Gustavo A. R. Silva
2017-06-30 15:08 ` Gary R Hook
2017-07-18 10:36 ` Herbert Xu

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