From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: <jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
"Kiran Kumar K" <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>, <ferruh.yigit@intel.com>, <stable@dpdk.org>,
"Gowrishankar Muthukrishnan" <gmuthukrishn@marvell.com>
Subject: [PATCH v2 07/10] common/cnxk: fix uninitialized variable issues
Date: Fri, 21 Jan 2022 17:34:21 +0530 [thread overview]
Message-ID: <20220121120424.28166-7-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20220121120424.28166-1-ndabilpuram@marvell.com>
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 <gmuthukrishn@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
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
next prev parent reply other threads:[~2022-01-21 12:05 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 9:13 [PATCH 1/8] common/cnxk: fix shift offset for tl3 length disable Nithin Dabilpuram
2021-12-09 9:13 ` [PATCH 2/8] common/cnxk: use for loop in shaper profiles cleanup Nithin Dabilpuram
2022-01-19 16:20 ` Jerin Jacob
2021-12-09 9:13 ` [PATCH 3/8] common/cnxk: change order of frag sizes and infos Nithin Dabilpuram
2022-01-19 16:25 ` Jerin Jacob
2022-01-21 10:03 ` Ferruh Yigit
2021-12-09 9:13 ` [PATCH 4/8] common/cnxk: reset stale values on error debug registers Nithin Dabilpuram
2022-01-19 16:25 ` Jerin Jacob
2021-12-09 9:13 ` [PATCH 5/8] common/cnxk: always use single qint with NIX Nithin Dabilpuram
2022-01-19 16:28 ` Jerin Jacob
2021-12-09 9:13 ` [PATCH 6/8] common/cnxk: handle issues from static analysis Nithin Dabilpuram
2022-01-19 16:44 ` Jerin Jacob
2022-01-21 10:05 ` Ferruh Yigit
2021-12-09 9:13 ` [PATCH 7/8] net/cnxk: improve inbound inline error handling for cn9k Nithin Dabilpuram
2022-01-21 10:06 ` Ferruh Yigit
2021-12-09 9:13 ` [PATCH 8/8] net/cnxk: synchronize inline session create and destroy Nithin Dabilpuram
2022-01-19 16:45 ` Jerin Jacob
2022-01-19 16:15 ` [PATCH 1/8] common/cnxk: fix shift offset for tl3 length disable Jerin Jacob
2022-01-21 10:08 ` Ferruh Yigit
2022-01-21 10:24 ` Nithin Kumar Dabilpuram
2022-01-21 12:04 ` [PATCH v2 01/10] common/cnxk: fix shift offset for TL3 " Nithin Dabilpuram
2022-01-21 12:04 ` [PATCH v2 02/10] common/cnxk: use for loop in shaper profiles cleanup Nithin Dabilpuram
2022-01-21 12:04 ` [PATCH v2 03/10] common/cnxk: fix byte order of frag sizes and infos Nithin Dabilpuram
2022-01-21 12:04 ` [PATCH v2 04/10] common/cnxk: reset stale values on error debug registers Nithin Dabilpuram
2022-01-21 12:04 ` [PATCH v2 05/10] common/cnxk: always use single interrupt ID with NIX Nithin Dabilpuram
2022-01-21 17:16 ` Kevin Traynor
2022-01-23 7:45 ` Jerin Jacob
2022-01-21 12:04 ` [PATCH v2 06/10] common/cnxk: fix null pointer dereferences Nithin Dabilpuram
2022-01-21 12:04 ` Nithin Dabilpuram [this message]
2022-01-21 12:04 ` [PATCH v2 08/10] net/cnxk: improve inbound inline error handling for cn9k Nithin Dabilpuram
2022-01-21 12:04 ` [PATCH v2 09/10] common/cnxk: set UDP ports for IPsec UDP encapsulation Nithin Dabilpuram
2022-01-21 12:04 ` [PATCH v2 10/10] net/cnxk: synchronize inline session create and destroy Nithin Dabilpuram
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=20220121120424.28166-7-ndabilpuram@marvell.com \
--to=ndabilpuram@marvell.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=gmuthukrishn@marvell.com \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
--cc=stable@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).