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 1FD92460ED; Wed, 22 Jan 2025 16:21:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7306A40647; Wed, 22 Jan 2025 16:20:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 10F49402D5 for ; Wed, 22 Jan 2025 16:20:55 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 601462046086; Wed, 22 Jan 2025 07:20:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 601462046086 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1737559254; bh=m7UmqOmIuMWnyLFtS/e9oozDffgPPKEVJFTrzZGYAXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KGEm8ToxEMTchr8D1UpMHwhHpxfUnjJQrMM3hkHe/z5Uhi+KNgWquOBqdzeWLi3Nc 1nbdV+9FgtbGC9rZSm1Fqzf2MHH0qCk6ELIR8mbLm+JEHNArNK3O1hgFK6iQoTGS2P c/z/E0ECfwLMWE7EePYgF/MM5pM6otuRBJSXRPP8= From: Andre Muezerie To: andremue@linux.microsoft.com Cc: anatoly.burakov@intel.com, bruce.richardson@intel.com, dev@dpdk.org, ian.stokes@intel.com, konstantin.v.ananyev@yandex.ru, vladimir.medvedkin@intel.com Subject: [PATCH v2 1/2] drivers/common: fix void function returning a value Date: Wed, 22 Jan 2025 07:20:43 -0800 Message-Id: <1737559244-9107-2-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1737559244-9107-1-git-send-email-andremue@linux.microsoft.com> References: <1735254890-18457-3-git-send-email-andremue@linux.microsoft.com> <1737559244-9107-1-git-send-email-andremue@linux.microsoft.com> 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 This patch avoids warnings like the one below emitted by MSVC: ../drivers/common/idpf/idpf_common_rxtx_avx512.c(139): warning C4098: 'idpf_singleq_rearm': 'void' function returning a value Signed-off-by: Andre Muezerie --- drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c index b8450b03ae..9ea71c3718 100644 --- a/drivers/common/idpf/idpf_common_rxtx_avx512.c +++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c @@ -137,8 +137,10 @@ idpf_singleq_rearm(struct idpf_rx_queue *rxq) rxdp += rxq->rxrearm_start; - if (unlikely(cache == NULL)) - return idpf_singleq_rearm_common(rxq); + if (unlikely(cache == NULL)) { + idpf_singleq_rearm_common(rxq); + return; + } /* We need to pull 'n' more MBUFs into the software ring from mempool * We inline the mempool function here, so we can vectorize the copy @@ -607,8 +609,10 @@ idpf_splitq_rearm(struct idpf_rx_queue *rx_bufq) rxdp += rx_bufq->rxrearm_start; - if (unlikely(!cache)) - return idpf_splitq_rearm_common(rx_bufq); + if (unlikely(!cache)) { + idpf_splitq_rearm_common(rx_bufq); + return; + } /* We need to pull 'n' more MBUFs into the software ring from mempool * We inline the mempool function here, so we can vectorize the copy -- 2.47.2.vfs.0.1