From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAC4FC433F5 for ; Sat, 12 Feb 2022 12:40:08 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 475B240395; Sat, 12 Feb 2022 13:40:08 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id A9FA540140 for ; Sat, 12 Feb 2022 13:40:06 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21CCGl4U009781 for ; Sat, 12 Feb 2022 04:40:06 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=edo900gmUdgBt5nVWUZaW7105CJv0OIM/OYwy4HrMME=; b=afbotAOmLcNpgIuIZ2KFWV4nq7CKX6RPeH6g6TLIqMSQnj1maKFfRWBTZexXMPbbjjI6 h2jAq7JDdZKYJRO0L9YDMV+rf71Z0KJk9EyUyjgWK9tMQMSwT5vUEo3pwVmxzLCDomt8 BdhnAb4d8Q5+Y3e2jrSrLBMxXPPwuB7/iXg2ljJMObTQjBcpDwBIp5ZhaK1AXHy+mCFs Vvk8IltO+MSCh+qbaqx+GwdaGBaxDltLwoJrcoVax9onp5OqeZyqQwLnH+k2wg2FwmWJ 1umvGWi2jBned9eHXMxHIaWXoJbIe8nLWurzYagNzX+YtWHuYHRRTZK0k7YUep3RciM/ MQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3e5y70j8y2-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 12 Feb 2022 04:40:06 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 12 Feb 2022 04:40:04 -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; Sat, 12 Feb 2022 04:40:04 -0800 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id 63A055B6956; Sat, 12 Feb 2022 04:40:02 -0800 (PST) From: Gowrishankar Muthukrishnan To: CC: Pavan Nikhilesh , Shijith Thotton , , Gowrishankar Muthukrishnan Subject: [PATCH 1/3] event/cnxk: fix incompatible casting of variables Date: Sat, 12 Feb 2022 18:09:46 +0530 Message-ID: <20220212123948.3394407-1-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: YixW_wBhuBnKc_ayhWIEalvVScR55-Da X-Proofpoint-GUID: YixW_wBhuBnKc_ayhWIEalvVScR55-Da 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-02-12_04,2022-02-11_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 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 --- 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