netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suman Ghosh <sumang@marvell.com>
To: <sgoutham@marvell.com>, <gakula@marvell.com>,
	<sbhatta@marvell.com>, <hkelam@marvell.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <lcherian@marvell.com>,
	<jerinj@marvell.com>, <markus.elfring@web.de>
Cc: Suman Ghosh <sumang@marvell.com>
Subject: [net PATCH 2/7] octeontx2-af: Fix klockwork issues in mcs_rvu_if.c
Date: Mon, 24 Jun 2024 16:06:33 +0530	[thread overview]
Message-ID: <20240624103638.2087821-3-sumang@marvell.com> (raw)
In-Reply-To: <20240624103638.2087821-1-sumang@marvell.com>

These are not real issues but sanity checks.

Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
index d39d86e694cc..de4482dee86a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
@@ -681,7 +681,7 @@ int rvu_mbox_handler_mcs_alloc_resources(struct rvu *rvu,
 	u16 pcifunc = req->hdr.pcifunc;
 	struct mcs_rsrc_map *map;
 	struct mcs *mcs;
-	int rsrc_id, i;
+	int rsrc_id = -EINVAL, i;
 
 	if (req->mcs_id >= rvu->mcs_blk_cnt)
 		return MCS_AF_ERR_INVALID_MCSID;
@@ -742,6 +742,8 @@ int rvu_mbox_handler_mcs_alloc_resources(struct rvu *rvu,
 			rsp->rsrc_cnt++;
 		}
 		break;
+	default:
+		goto exit;
 	}
 
 	rsp->rsrc_type = req->rsrc_type;
@@ -854,7 +856,7 @@ int rvu_mbox_handler_mcs_ctrl_pkt_rule_write(struct rvu *rvu,
 static void rvu_mcs_set_lmac_bmap(struct rvu *rvu)
 {
 	struct mcs *mcs = mcs_get_pdata(0);
-	unsigned long lmac_bmap;
+	unsigned long lmac_bmap = 0;
 	int cgx, lmac, port;
 
 	for (port = 0; port < mcs->hw->lmac_cnt; port++) {
-- 
2.25.1


  parent reply	other threads:[~2024-06-24 10:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 10:36 [net PATCH 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
2024-06-24 10:36 ` [net PATCH 1/7] octeontx2-af: Fix klockwork issue in cgx.c Suman Ghosh
2024-06-24 12:11   ` Markus Elfring
2024-06-24 10:36 ` Suman Ghosh [this message]
2024-06-24 10:36 ` [net PATCH 3/7] octeontx2-af: Fixes klockwork issues in ptp.c Suman Ghosh
2024-06-24 10:36 ` [net PATCH 4/7] octeontx2-af: Fixes klockwork issues in rvu_cpt.c Suman Ghosh
2024-06-24 10:36 ` [net PATCH 5/7] octeontx2-af: Fixes klockwork issues in rvu_debugfs.c Suman Ghosh
2024-06-24 10:36 ` [net PATCH 6/7] octeontx2-af: Fix klockwork issue in rvu_nix.c Suman Ghosh
2024-06-24 10:36 ` [net PATCH 7/7] octeontx2-af: Fix klockwork issue in rvu_npc.c Suman Ghosh
2024-06-24 11:13 ` [net PATCH 0/7] octeontx2-af: Fix klockwork issues in AF driver Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2024-06-25 17:33 [net PATCH v2 " Suman Ghosh
2024-06-25 17:33 ` [net PATCH 2/7] octeontx2-af: Fix klockwork issues in mcs_rvu_if.c Suman Ghosh
2024-06-25 18:37   ` Markus Elfring

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=20240624103638.2087821-3-sumang@marvell.com \
    --to=sumang@marvell.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.elfring@web.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /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).