DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] fix void function returning a value
@ 2024-12-26 23:14 Andre Muezerie
  2024-12-26 23:14 ` [PATCH 1/2] drivers_common: " Andre Muezerie
  2024-12-26 23:14 ` [PATCH 2/2] drivers_net: " Andre Muezerie
  0 siblings, 2 replies; 3+ messages in thread
From: Andre Muezerie @ 2024-12-26 23:14 UTC (permalink / raw)
  Cc: dev, Andre Muezerie

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

Andre Muezerie (2):
  drivers_common: fix void function returning a value
  drivers_net: fix void function returning a value

 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

--
2.47.0.vfs.0.3


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

* [PATCH 1/2] drivers_common: fix void function returning a value
  2024-12-26 23:14 [PATCH 0/2] fix void function returning a value Andre Muezerie
@ 2024-12-26 23:14 ` Andre Muezerie
  2024-12-26 23:14 ` [PATCH 2/2] drivers_net: " Andre Muezerie
  1 sibling, 0 replies; 3+ messages in thread
From: Andre Muezerie @ 2024-12-26 23:14 UTC (permalink / raw)
  To: Bruce Richardson, Konstantin Ananyev, Jingjing Wu, Praveen Shetty
  Cc: dev, Andre Muezerie

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


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

* [PATCH 2/2] drivers_net: fix void function returning a value
  2024-12-26 23:14 [PATCH 0/2] fix void function returning a value Andre Muezerie
  2024-12-26 23:14 ` [PATCH 1/2] drivers_common: " Andre Muezerie
@ 2024-12-26 23:14 ` Andre Muezerie
  1 sibling, 0 replies; 3+ messages in thread
From: Andre Muezerie @ 2024-12-26 23:14 UTC (permalink / raw)
  To: Bruce Richardson, Konstantin Ananyev, Ian Stokes,
	Vladimir Medvedkin, Anatoly Burakov
  Cc: dev, Andre Muezerie

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/net/i40e/i40e_rxtx_vec_avx2.c   | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 19cf0ac718..3e95a6a1df 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -22,7 +22,7 @@
 static __rte_always_inline void
 i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 {
-	return i40e_rxq_rearm_common(rxq, false);
+	i40e_rxq_rearm_common(rxq, false);
 }
 
 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
index 3b2750221b..ae7bcb582b 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c
@@ -24,7 +24,7 @@
 static __rte_always_inline void
 i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 {
-	return i40e_rxq_rearm_common(rxq, true);
+	i40e_rxq_rearm_common(rxq, true);
 }
 
 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index 49d41af953..cdb48438da 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -13,7 +13,7 @@
 static __rte_always_inline void
 iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 {
-	return iavf_rxq_rearm_common(rxq, false);
+	iavf_rxq_rearm_common(rxq, false);
 }
 
 #define PKTLEN_SHIFT     10
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index d6e88dbb29..02bfb9b15d 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -14,7 +14,7 @@
 static __rte_always_inline void
 ice_rxq_rearm(struct ice_rx_queue *rxq)
 {
-	return ice_rxq_rearm_common(rxq, false);
+	ice_rxq_rearm_common(rxq, false);
 }
 
 static __rte_always_inline __m256i
-- 
2.47.0.vfs.0.3


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

end of thread, other threads:[~2024-12-26 23:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-26 23:14 [PATCH 0/2] fix void function returning a value Andre Muezerie
2024-12-26 23:14 ` [PATCH 1/2] drivers_common: " Andre Muezerie
2024-12-26 23:14 ` [PATCH 2/2] drivers_net: " Andre Muezerie

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