All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos
@ 2021-12-22  2:08 Kai Ye
       [not found] ` <CAHp75VfoxrEjV+M3kSECo2gLReZsnkPcNsGdPNYHhaJCfQxqCg@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Ye @ 2021-12-22  2:08 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto, linux-kernel, wangzhou1, yekai13

The kernel test rebot report this warning: Uninitialized variable: ret.
Here is fix it.

Signed-off-by: Kai Ye <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


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

* Re: [PATCH] crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos
       [not found] ` <CAHp75VfoxrEjV+M3kSECo2gLReZsnkPcNsGdPNYHhaJCfQxqCg@mail.gmail.com>
@ 2021-12-23  2:16   ` yekai(A)
  0 siblings, 0 replies; 2+ messages in thread
From: yekai(A) @ 2021-12-23  2:16 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: herbert, linux-crypto, linux-kernel, wangzhou1



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

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

end of thread, other threads:[~2021-12-23  2:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  2:08 [PATCH] crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos Kai Ye
     [not found] ` <CAHp75VfoxrEjV+M3kSECo2gLReZsnkPcNsGdPNYHhaJCfQxqCg@mail.gmail.com>
2021-12-23  2:16   ` yekai(A)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.