From: Tom Rix <trix@redhat.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: sgoutham@marvell.com, lcherian@marvell.com, gakula@marvell.com,
jerinj@marvell.com, hkelam@marvell.com, sbhatta@marvell.com,
davem@davemloft.net, kuba@kernel.org, nathan@kernel.org,
schalla@marvell.com, vvelumuri@marvell.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Colin Ian King <colin.king@canonical.com>
Subject: Re: [PATCH] octeontx2-af: fix uninitialized variable
Date: Mon, 20 Sep 2021 16:08:17 -0700 [thread overview]
Message-ID: <9926e65d-6083-8d9d-efa2-a755c411ea03@redhat.com> (raw)
In-Reply-To: <CAKwvOdkSt5VymxtJ4jmOe9LM1rdy+CV7yYXhjCgOFAgbKGEPfQ@mail.gmail.com>
On 9/20/21 3:22 PM, Nick Desaulniers wrote:
> On Mon, Sep 20, 2021 at 9:54 AM <trix@redhat.com> wrote:
>> From: Tom Rix <trix@redhat.com>
>>
>> Building with clang 13 reports this error
>> rvu_nix.c:4600:7: error: variable 'val' is used uninitialized whenever
>> 'if' condition is false
>> if (!is_rvu_otx2(rvu))
>> ^~~~~~~~~~~~~~~~~
>>
>> So initialize val.
>>
>> Fixes: 4b5a3ab17c6c ("octeontx2-af: Hardware configuration for inline IPsec")
>> Signed-off-by: Tom Rix <trix@redhat.com>
> Thanks for the patch, but it looks like Colin beat you to the punch.
> In linux-next, I see:
> commit d853f1d3c900 ("octeontx2-af: Fix uninitialized variable val")
No worries, those allyesconfig breaks are easy to find :)
Tom
>
>> ---
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
>> index ea3e03fa55d45c..70431db866b328 100644
>> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
>> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
>> @@ -4592,7 +4592,7 @@ static void nix_inline_ipsec_cfg(struct rvu *rvu, struct nix_inline_ipsec_cfg *r
>> int blkaddr)
>> {
>> u8 cpt_idx, cpt_blkaddr;
>> - u64 val;
>> + u64 val = 0;
>>
>> cpt_idx = (blkaddr == BLKADDR_NIX0) ? 0 : 1;
>> if (req->enable) {
>> --
>> 2.26.3
>>
>
prev parent reply other threads:[~2021-09-20 23:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 16:53 trix
2021-09-20 22:22 ` Nick Desaulniers
2021-09-20 23:08 ` Tom Rix [this message]
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=9926e65d-6083-8d9d-efa2-a755c411ea03@redhat.com \
--to=trix@redhat.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=sbhatta@marvell.com \
--cc=schalla@marvell.com \
--cc=sgoutham@marvell.com \
--cc=vvelumuri@marvell.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
Powered by JetHome