[v2,2/2] drivers/net: fix void function returning a value

Message ID 1737559244-9107-3-git-send-email-andremue@linux.microsoft.com (mailing list archive)
State Accepted
Delegated to: Bruce Richardson
Headers
Series fix void function returning a value |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Andre Muezerie Jan. 22, 2025, 3:20 p.m. UTC
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(-)
  

Comments

Bruce Richardson Jan. 22, 2025, 3:48 p.m. UTC | #1
On Wed, Jan 22, 2025 at 07:20:44AM -0800, Andre Muezerie wrote:
> 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(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Bruce Richardson Feb. 10, 2025, 11:36 a.m. UTC | #2
On Wed, Jan 22, 2025 at 03:48:11PM +0000, Bruce Richardson wrote:
> On Wed, Jan 22, 2025 at 07:20:44AM -0800, Andre Muezerie wrote:
> > 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(-)
> > 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Fixes: 0604b1f2208f ("net/i40e: fix crash in AVX512")
Fixes: 4eb3dcce7c5d ("net/iavf: fix crash in AVX512")
Fixes: 20daa1c978b7 ("net/ice: fix crash in AVX512")
Cc: stable@dpdk.org

Patch applied to dpdk-next-net-intel

Thanks,
/Bruce
  

Patch

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