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 8D380A034E; Sat, 12 Feb 2022 13:40:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64289411C3; Sat, 12 Feb 2022 13:40:12 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 9818E4118F for ; Sat, 12 Feb 2022 13:40:10 +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 21CBO2As021280 for ; Sat, 12 Feb 2022 04:40:09 -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-transfer-encoding : content-type; s=pfpt0220; bh=D+IMe+tKtqBuaSUH/cxJEIa82dpAefzsZ87cUYEbseY=; b=T73UhjWEVpZCwbMYADpmnFEi+cL7k3WG8MNxLb/hszwxthA1WftU+XVF/66R8XTDvjx1 Pzs0QK/ehxCseDjuccVjn+DkACS9MoKqjDpdqEMuLXaUWNzIUtgoOfJx+GTWOIQwOt2m +/FV0IYDQtad6e0glcRh5So5AUNlHgYf1sV037U+C6n9edzTWBo2GrBa+mCxP9tWJYZy MY0UU1hBT074attm0GklYP5Wko1kZorsoXs3tWo7vyeDiY7p8m3tXt6eYD+zkqNQCYJz gdpFax2zv+YN9aQ+DDDq5xSLB8rjfKuRbguyihotQF35JDB8wZepvqYHN37trtYSci+G /g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3e6b4rr8p9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 12 Feb 2022 04:40:09 -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; Sat, 12 Feb 2022 04:40:08 -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:08 -0800 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id AAC135B694F; Sat, 12 Feb 2022 04:40:06 -0800 (PST) From: Gowrishankar Muthukrishnan To: CC: Pavan Nikhilesh , Shijith Thotton , , Gowrishankar Muthukrishnan Subject: [PATCH 3/3] event/cnxk: fix uninitialized local variable Date: Sat, 12 Feb 2022 18:09:48 +0530 Message-ID: <20220212123948.3394407-3-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220212123948.3394407-1-gmuthukrishn@marvell.com> References: <20220212123948.3394407-1-gmuthukrishn@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: Grs2LPsvQCUt9XsEhPegytY1HDmU5awe X-Proofpoint-GUID: Grs2LPsvQCUt9XsEhPegytY1HDmU5awe 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 uninitialized local variable as reported in coverity scan. Fixes: 300b796262a ("event/cnxk: add timer arm routine") Fixes: 300b796262a ("event/cnxk: add timer arm routine" Coverity issue: 370578, 370579, 370587 Signed-off-by: Gowrishankar Muthukrishnan --- drivers/event/cnxk/cnxk_tim_worker.c | 2 +- drivers/event/cnxk/cnxk_tim_worker.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/event/cnxk/cnxk_tim_worker.c b/drivers/event/cnxk/cnxk_tim_worker.c index 3ce99864a6..dfcfbdc797 100644 --- a/drivers/event/cnxk/cnxk_tim_worker.c +++ b/drivers/event/cnxk/cnxk_tim_worker.c @@ -63,7 +63,7 @@ cnxk_tim_timer_arm_burst(const struct rte_event_timer_adapter *adptr, struct cnxk_tim_ring *tim_ring = adptr->data->adapter_priv; struct cnxk_tim_ent entry; uint16_t index; - int ret; + int ret = 0; cnxk_tim_sync_start_cyc(tim_ring); for (index = 0; index < nb_timers; index++) { diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h index 78e36ffafe..0c9f29cfbe 100644 --- a/drivers/event/cnxk/cnxk_tim_worker.h +++ b/drivers/event/cnxk/cnxk_tim_worker.h @@ -233,8 +233,8 @@ cnxk_tim_add_entry_sp(struct cnxk_tim_ring *const tim_ring, const struct cnxk_tim_ent *const pent, const uint8_t flags) { + struct cnxk_tim_ent *chunk = NULL; struct cnxk_tim_bkt *mirr_bkt; - struct cnxk_tim_ent *chunk; struct cnxk_tim_bkt *bkt; uint64_t lock_sema; int16_t rem; @@ -316,8 +316,8 @@ cnxk_tim_add_entry_mp(struct cnxk_tim_ring *const tim_ring, const struct cnxk_tim_ent *const pent, const uint8_t flags) { + struct cnxk_tim_ent *chunk = NULL; struct cnxk_tim_bkt *mirr_bkt; - struct cnxk_tim_ent *chunk; struct cnxk_tim_bkt *bkt; uint64_t lock_sema; int64_t rem; -- 2.25.1