DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Praveen Shetty <praveen.shetty@intel.com>
Cc: dev@dpdk.org, Andre Muezerie <andremue@linux.microsoft.com>
Subject: [PATCH 1/2] drivers_common: fix void function returning a value
Date: Thu, 26 Dec 2024 15:14:49 -0800	[thread overview]
Message-ID: <1735254890-18457-2-git-send-email-andremue@linux.microsoft.com> (raw)
In-Reply-To: <1735254890-18457-1-git-send-email-andremue@linux.microsoft.com>

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 <andremue@linux.microsoft.com>
---
 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.0.vfs.0.3


  reply	other threads:[~2024-12-26 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 23:14 [PATCH 0/2] " Andre Muezerie
2024-12-26 23:14 ` Andre Muezerie [this message]
2024-12-26 23:14 ` [PATCH 2/2] drivers_net: " Andre Muezerie

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=1735254890-18457-2-git-send-email-andremue@linux.microsoft.com \
    --to=andremue@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=praveen.shetty@intel.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).