lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5BA0A6CB.1010607@huawei.com>
Date:   Tue, 18 Sep 2018 15:18:35 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     Michael Chan <michael.chan@...adcom.com>
CC:     David Miller <davem@...emloft.net>,
        Vasundhara Volam <vasundhara-v.volam@...adcom.com>,
        Netdev <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] net: bnxt: Fix a uninitialized variable warning.

On 2018/9/18 15:02, Michael Chan wrote:
> On Mon, Sep 17, 2018 at 9:55 PM, zhong jiang <zhongjiang@...wei.com> wrote:
>> Fix the following compile warning:
>>
>> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:49:5: warning: ‘nvm_param.dir_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   if (nvm_param.dir_type == BNXT_NVM_PORT_CFG)
>>
>> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
>> ---
>>  drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
>> index f3b9fbc..1ae56fc 100644
>> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
>> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
>> @@ -46,6 +46,9 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
>>                 }
>>         }
>>
>> +       if (i == ARRAY_SIZE(nvm_params))
>> +               return -EINVAL;
>> +
> -EOPNOTSUPP might be a better return code.  Other than that, it looks
> good to me.  Thanks.
Thanks for suggestion.  Will repost.

Sincerely,
zhong jiang
>>         if (nvm_param.dir_type == BNXT_NVM_PORT_CFG)
>>                 idx = bp->pf.port_id;
>>         else if (nvm_param.dir_type == BNXT_NVM_FUNC_CFG)
>> --
>> 1.7.12.4
>>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ