From: "yekai(A)" <yekai13@huawei.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"wangzhou1@hisilicon.com" <wangzhou1@hisilicon.com>
Subject: Re: [PATCH] crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos
Date: Thu, 23 Dec 2021 10:16:14 +0800 [thread overview]
Message-ID: <0915e7b7-05e7-6e96-60e8-2a3113cf337a@huawei.com> (raw)
In-Reply-To: <CAHp75VfoxrEjV+M3kSECo2gLReZsnkPcNsGdPNYHhaJCfQxqCg@mail.gmail.com>
On 2021/12/23 9:51, Andy Shevchenko wrote:
>
>
> On Wednesday, December 22, 2021, Kai Ye <yekai13@huawei.com
> <mailto:yekai13@huawei.com>> wrote:
>
> The kernel test rebot report this warning: Uninitialized variable: ret.
> Here is fix it.
>
>
> How do you know that 0 is the correct value?
>
>
>
> Signed-off-by: Kai Ye <yekai13@huawei.com <mailto:yekai13@huawei.com>>
> ---
> drivers/crypto/hisilicon/qm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/hisilicon/qm.c
> b/drivers/crypto/hisilicon/qm.c
> index b1fe9c7b8cc8..c6e9ad2041c3 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -4279,8 +4279,7 @@ static void qm_vf_get_qos(struct hisi_qm *qm,
> u32 fun_num)
>
> static int qm_vf_read_qos(struct hisi_qm *qm)
> {
> - int cnt = 0;
> - int ret;
> + int cnt = 0, ret = 0;
>
> /* reset mailbox qos val */
> qm->mb_qos = 0;
> --
> 2.33.0
>
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
we set the 0 to success in kernel style.
thanks
Kai
prev parent reply other threads:[~2021-12-23 2:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 2:08 Kai Ye
[not found] ` <CAHp75VfoxrEjV+M3kSECo2gLReZsnkPcNsGdPNYHhaJCfQxqCg@mail.gmail.com>
2021-12-23 2:16 ` yekai(A) [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=0915e7b7-05e7-6e96-60e8-2a3113cf337a@huawei.com \
--to=yekai13@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangzhou1@hisilicon.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
all inboxes | Powered by JetHome®