linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Cc: Pascal van Leeuwen <pascalvanl@gmail.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized warning
Date: Mon, 30 Sep 2019 18:50:44 +0000	[thread overview]
Message-ID: <CH2PR20MB29689C8C08D524BA05573EE9CA820@CH2PR20MB2968.namprd20.prod.outlook.com> (raw)
In-Reply-To: <20190930121520.1388317-1-arnd@arndb.de>

> -----Original Message-----
> From: Arnd Bergmann <arnd@arndb.de>
> Sent: Monday, September 30, 2019 2:15 PM
> To: Antoine Tenart <antoine.tenart@bootlin.com>; Herbert Xu <herbert@gondor.apana.org.au>;
> David S. Miller <davem@davemloft.net>
> Cc: Arnd Bergmann <arnd@arndb.de>; Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>; Pascal van
> Leeuwen <pascalvanl@gmail.com>; linux-crypto@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized warning
> 
> A previous fixup avoided an unused variable warning but replaced
> it with a slightly scarier warning:
> 
> drivers/crypto/inside-secure/safexcel.c:1100:6: error: variable 'irq' is used uninitialized
> whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
> 
> This is harmless as it is impossible to get into this case, but
> the compiler has no way of knowing that. Add an explicit error
> handling case to make it obvious to both compilers and humans
> reading the source.
> 
> Fixes: 212ef6f29e5b ("crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/crypto/inside-secure/safexcel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
> index 4ab1bde8dd9b..311bf60df39f 100644
> --- a/drivers/crypto/inside-secure/safexcel.c
> +++ b/drivers/crypto/inside-secure/safexcel.c
> @@ -1120,6 +1120,8 @@ static int safexcel_request_ring_irq(void *pdev, int irqid,
>  				irq_name, irq);
>  			return irq;
>  		}
> +	} else {
> +		return -ENXIO;
>  	}
> 
>  	ret = devm_request_threaded_irq(dev, irq, handler,
> --
> 2.20.0

Ok, this won't hurt in any way I guess, so fine by me (assuming that error
code makes sense).

Acked-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>


Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com


  parent reply	other threads:[~2019-09-30 20:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 12:14 [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized warning Arnd Bergmann
2019-09-30 12:14 ` [PATCH 2/3] crypto: inside-secure - Reduce stack usage Arnd Bergmann
2019-09-30 19:04   ` Pascal Van Leeuwen
2019-09-30 20:11     ` Arnd Bergmann
2019-09-30 21:09       ` Pascal Van Leeuwen
2019-10-01 18:49         ` Arnd Bergmann
2019-10-10 12:40   ` Herbert Xu
2019-09-30 12:14 ` [PATCH 3/3] crypto: inside-secure - Remove #ifdef checks Arnd Bergmann
2019-09-30 13:04   ` Bjorn Helgaas
2019-10-10 12:55   ` Herbert Xu
2019-10-17 13:26   ` Pascal Van Leeuwen
2019-10-17 13:47     ` Arnd Bergmann
2019-10-17 14:14       ` Pascal Van Leeuwen
2019-09-30 18:50 ` Pascal Van Leeuwen [this message]
2019-10-10 12:54 ` [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized warning Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH2PR20MB29689C8C08D524BA05573EE9CA820@CH2PR20MB2968.namprd20.prod.outlook.com \
    --to=pvanleeuwen@verimatrix.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pascalvanl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).