From: Gary R Hook <gary.hook@amd•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
Herbert Xu <herbert@gondor•apana.org.au>
Cc: Linux-Next Mailing List <linux-next@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>
Subject: Re: linux-next: build warning after merge of the crypto tree
Date: Mon, 31 Jul 2017 08:50:28 -0500 [thread overview]
Message-ID: <25e2301b-258c-df38-3417-d446b820e924@amd.com> (raw)
In-Reply-To: <20170731121756.6f54cadf@canb.auug.org.au>
On 07/30/2017 09:17 PM, Stephen Rothwell wrote:
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
> drivers/crypto/ccp/ccp-ops.c:1856:3: warning: 'sb_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
> cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
> ^
>
> Maybe introduced by commit
>
> 6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs")
>
Actually, it's been this way for a while: 956ee21 should be the commit
that introduced the spurious warning.
If you can explain to me a way to get the compiler to either (a) be
smarter, or (b) shut up about this, I'd like to hear it. I see this with
gcc 4.8/4.9/50.
IMO the compiler is incorrect. The code path where the variable is used
is complete, and the path where it is unused is complete. I don't see a
way for a logic error (and thus, use an uninitialized variable) to occur.
If someone can enlighten me, I'd appreciate it. Or, I can change the
code to recompute the value when it's needed.
next prev parent reply other threads:[~2017-07-31 13:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 2:17 linux-next: build warning after merge of the crypto tree Stephen Rothwell
2017-07-31 13:50 ` Gary R Hook [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-10-20 3:07 Stephen Rothwell
2025-10-20 2:53 Stephen Rothwell
2025-10-20 3:34 ` Bagas Sanjaya
2025-06-16 5:31 Stephen Rothwell
2024-10-08 6:29 Stephen Rothwell
2024-02-12 3:48 Stephen Rothwell
2024-02-12 12:59 ` Cabiddu, Giovanni
2022-11-21 1:52 Stephen Rothwell
2022-07-11 10:49 Stephen Rothwell
2019-08-23 3:14 Stephen Rothwell
2019-08-25 18:01 ` Hans de Goede
2019-02-04 0:01 Stephen Rothwell
2018-10-05 5:31 Stephen Rothwell
2018-03-19 1:04 Stephen Rothwell
2018-03-19 5:44 ` Harsh Jain
2018-01-19 1:49 Stephen Rothwell
2018-01-19 4:21 ` Harsh Jain
2018-01-19 5:12 ` Herbert Xu
2016-08-25 1:38 Stephen Rothwell
2016-08-25 6:20 ` Martin Schwidefsky
2016-08-25 7:47 ` Herbert Xu
2016-08-25 11:14 ` Stephen Rothwell
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=25e2301b-258c-df38-3417-d446b820e924@amd.com \
--to=gary.hook@amd$(echo .)com \
--cc=herbert@gondor$(echo .)apana.org.au \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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