[v2,1/2] drivers/common: fix void function returning a value
Checks
Commit Message
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(-)
Comments
On Wed, Jan 22, 2025 at 07:20:43AM -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/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
On Wed, Jan 22, 2025 at 03:47:29PM +0000, Bruce Richardson wrote:
> On Wed, Jan 22, 2025 at 07:20:43AM -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/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
> > 1 file changed, 8 insertions(+), 4 deletions(-)
> >
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Fixes: 5bf87b45b2c8 ("net/idpf: add AVX512 data path for single queue model")
Fixes: e528d7c74819 ("common/idpf: add AVX512 data path for split queue model")
Cc: stable@dpdk.org
patch applied to dpdk-next-net-intel
Thanks,
/Bruce
@@ -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