From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81482A0353; Fri, 21 Jan 2022 13:05:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FE9142785; Fri, 21 Jan 2022 13:05:02 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A69CC42767; Fri, 21 Jan 2022 13:05:00 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20LAq1Bm015220; Fri, 21 Jan 2022 04:04:59 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=Q7QVbIK6MpeRMQhSBeNBkGzVdu9gTbqbcMksRhiQ5qU=; b=LBP7JzFSr6s+NiK/qdU83K4jgz8sIRGKUe83b5IUes3Y9UjF81lWWSaOoa3UGDZdugnv 8jdFn/b/niWRavt1eXSnO6rflC4zmSPpDOkPWeYj37u9eLrUbgUNldIchc7a69gf7it/ aLkcYaI1RD2D2cEsGL4OzNpo3H1xavedATYz5GWt3WRCRWfRtH/hAl7SD0ltlgFC7+TP EblW6VQWH8kXZzzW+c/Md9K5wkbX8v8JioUfhD7UY8LzQO7awYwmJySD6BQyayQOvaI6 XkctplA8daAivtI4upAjLWoEc2gmeKdM0a6y30fQLvlo+eouB5tiJg0lxlL/6PI/zqBQ mA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dqhytsw8v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 21 Jan 2022 04:04:59 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 21 Jan 2022 04:04:58 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 21 Jan 2022 04:04:58 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 31A873F7095; Fri, 21 Jan 2022 04:04:54 -0800 (PST) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: , , , "Gowrishankar Muthukrishnan" Subject: [PATCH v2 07/10] common/cnxk: fix uninitialized variable issues Date: Fri, 21 Jan 2022 17:34:21 +0530 Message-ID: <20220121120424.28166-7-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220121120424.28166-1-ndabilpuram@marvell.com> References: <20211209091342.27017-1-ndabilpuram@marvell.com> <20220121120424.28166-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: Xu58my8YZW-uwUVZZ2HzlAKVPB6K72zH X-Proofpoint-GUID: Xu58my8YZW-uwUVZZ2HzlAKVPB6K72zH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-21_06,2022-01-21_01,2021-12-02_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix uninitialized variable issues reported by klockwork(static analysis tool). Fixes: ed135040f0ab ("common/cnxk: add CPT LF configuration") Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class") Fixes: 58debb813a8d ("common/cnxk: enable TM to listen on Rx pause frames") Cc: stable@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan Signed-off-by: Nithin Dabilpuram Acked-by: Jerin Jacob --- drivers/common/cnxk/roc_cpt.c | 4 ++-- drivers/common/cnxk/roc_dev.c | 2 +- drivers/common/cnxk/roc_nix_tm.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c index 84cc5f0..0e2dc45 100644 --- a/drivers/common/cnxk/roc_cpt.c +++ b/drivers/common/cnxk/roc_cpt.c @@ -815,9 +815,9 @@ roc_cpt_eng_grp_add(struct roc_cpt *roc_cpt, enum cpt_eng_type eng_type) void roc_cpt_iq_disable(struct roc_cpt_lf *lf) { + volatile union cpt_lf_q_grp_ptr grp_ptr = {.u = 0x0}; + volatile union cpt_lf_inprog lf_inprog = {.u = 0x0}; union cpt_lf_ctl lf_ctl = {.u = 0x0}; - union cpt_lf_q_grp_ptr grp_ptr; - union cpt_lf_inprog lf_inprog; int timeout = 20; int cnt; diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c index 0ac50ca..9a86969 100644 --- a/drivers/common/cnxk/roc_dev.c +++ b/drivers/common/cnxk/roc_dev.c @@ -57,7 +57,7 @@ pf_af_sync_msg(struct dev *dev, struct mbox_msghdr **rsp) struct mbox *mbox = dev->mbox; struct mbox_dev *mdev = &mbox->dev[0]; - volatile uint64_t int_status; + volatile uint64_t int_status = 0; struct mbox_msghdr *msghdr; uint64_t off; int rc = 0; diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c index 3b38cc0..a0448be 100644 --- a/drivers/common/cnxk/roc_nix_tm.c +++ b/drivers/common/cnxk/roc_nix_tm.c @@ -424,7 +424,7 @@ nix_tm_bp_config_get(struct roc_nix *roc_nix, bool *is_enabled) if (req) { req->num_regs = k; - rc = mbox_process(mbox); + rc = mbox_process_msg(mbox, (void **)&rsp); if (rc) goto err; /* Report it as enabled only if enabled or all */ -- 2.8.4