DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] event/cnxk: fix incompatible casting of variables
@ 2022-02-12 12:39 Gowrishankar Muthukrishnan
  2022-02-12 12:39 ` [PATCH 2/3] event/cnxk: fix memory leak Gowrishankar Muthukrishnan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gowrishankar Muthukrishnan @ 2022-02-12 12:39 UTC (permalink / raw)
  To: dev; +Cc: Pavan Nikhilesh, Shijith Thotton, jerinj, Gowrishankar Muthukrishnan

Fix incompatible casting on variables reported by coverity scan.

Fixes: 6223ede2036 ("event/cnxk: add event port link and unlink")
Coverity issue: 370582 370584

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c |  4 ++--
 drivers/event/cnxk/cn9k_eventdev.c  | 11 ++++-------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index 7b7ce44c74..2bcf5066c4 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -98,10 +98,10 @@ cn10k_sso_hws_release(void *arg, void *hws)
 {
 	struct cnxk_sso_evdev *dev = arg;
 	struct cn10k_sso_hws *ws = hws;
-	int i;
+	uint16_t i;
 
 	for (i = 0; i < dev->nb_event_queues; i++)
-		roc_sso_hws_unlink(&dev->sso, ws->hws_id, (uint16_t *)&i, 1);
+		roc_sso_hws_unlink(&dev->sso, ws->hws_id, &i, 1);
 	memset(ws, 0, sizeof(*ws));
 }
 
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 4611936b7f..3413467edc 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -97,24 +97,21 @@ cn9k_sso_hws_release(void *arg, void *hws)
 	struct cnxk_sso_evdev *dev = arg;
 	struct cn9k_sso_hws_dual *dws;
 	struct cn9k_sso_hws *ws;
-	int i;
+	uint16_t i;
 
 	if (dev->dual_ws) {
 		dws = hws;
 		for (i = 0; i < dev->nb_event_queues; i++) {
 			roc_sso_hws_unlink(&dev->sso,
-					   CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 0),
-					   (uint16_t *)&i, 1);
+					   CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 0), &i, 1);
 			roc_sso_hws_unlink(&dev->sso,
-					   CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 1),
-					   (uint16_t *)&i, 1);
+					   CN9K_DUAL_WS_PAIR_ID(dws->hws_id, 1), &i, 1);
 		}
 		memset(dws, 0, sizeof(*dws));
 	} else {
 		ws = hws;
 		for (i = 0; i < dev->nb_event_queues; i++)
-			roc_sso_hws_unlink(&dev->sso, ws->hws_id,
-					   (uint16_t *)&i, 1);
+			roc_sso_hws_unlink(&dev->sso, ws->hws_id, &i, 1);
 		memset(ws, 0, sizeof(*ws));
 	}
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-22  9:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12 12:39 [PATCH 1/3] event/cnxk: fix incompatible casting of variables Gowrishankar Muthukrishnan
2022-02-12 12:39 ` [PATCH 2/3] event/cnxk: fix memory leak Gowrishankar Muthukrishnan
2022-02-12 12:39 ` [PATCH 3/3] event/cnxk: fix uninitialized local variable Gowrishankar Muthukrishnan
2022-02-22  9:50 ` [PATCH 1/3] event/cnxk: fix incompatible casting of variables Jerin Jacob

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).