[13/15] net/bnxt: fix a compilation warning
Checks
Commit Message
Compiler complains of an uninitialized variable.
Initializing it to avoid the issue.
Fixes: db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
No worries. I will get to it.
From mobile device
> On Jul 12, 2019, at 11:36, Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
>
> Compiler complains of an uninitialized variable.
> Initializing it to avoid the issue.
>
> Fixes: db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
> ---
> drivers/net/bnxt/bnxt_hwrm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index 1a0265f8a..a4e0c2e0c 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -1523,8 +1523,8 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
> int rc = 0;
> struct hwrm_vnic_cfg_input req = {.req_type = 0 };
> struct hwrm_vnic_cfg_output *resp = bp->hwrm_cmd_resp_addr;
> + struct bnxt_plcmodes_cfg pmodes = { 0 };
> uint32_t ctx_enable_flag = 0;
> - struct bnxt_plcmodes_cfg pmodes;
> uint32_t enables = 0;
>
> if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
> --
> 2.20.1 (Apple Git-117)
>
@@ -1523,8 +1523,8 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
int rc = 0;
struct hwrm_vnic_cfg_input req = {.req_type = 0 };
struct hwrm_vnic_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+ struct bnxt_plcmodes_cfg pmodes = { 0 };
uint32_t ctx_enable_flag = 0;
- struct bnxt_plcmodes_cfg pmodes;
uint32_t enables = 0;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {