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 <andre...@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 via email to