hash: remove return statement from function returning void
Checks
Commit Message
rte_thash_gfni_bulk and rte_thash_gfni_bulk_stub both return void.
Remove superfluous return statement from rte_thash_gfni_bulk.
Fixes: 944a03a5cfc1 ("hash: fix MSVC link on GFNI stubs")
Cc: stephen@networkplumber.org
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/hash/rte_thash_gfni.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello Tyler,
On Fri, Mar 8, 2024 at 10:20 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> rte_thash_gfni_bulk and rte_thash_gfni_bulk_stub both return void.
> Remove superfluous return statement from rte_thash_gfni_bulk.
>
> Fixes: 944a03a5cfc1 ("hash: fix MSVC link on GFNI stubs")
> Cc: stephen@networkplumber.org
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
> lib/hash/rte_thash_gfni.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/hash/rte_thash_gfni.h b/lib/hash/rte_thash_gfni.h
> index edae2e8..132f375 100644
> --- a/lib/hash/rte_thash_gfni.h
> +++ b/lib/hash/rte_thash_gfni.h
> @@ -71,7 +71,7 @@
> rte_thash_gfni_bulk(const uint64_t *mtrx, int len, uint8_t *tuple[],
> uint32_t val[], uint32_t num)
> {
> - return rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
> + rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
> }
I am surprised the CI did not catch it.
I need to pass -pedantic when compiling with this header, but no code
does this in-tree.
How did you catch this issue?
On Thu, Mar 14, 2024 at 04:58:54PM +0100, David Marchand wrote:
> Hello Tyler,
>
> On Fri, Mar 8, 2024 at 10:20 PM Tyler Retzlaff
> <roretzla@linux.microsoft.com> wrote:
> >
> > rte_thash_gfni_bulk and rte_thash_gfni_bulk_stub both return void.
> > Remove superfluous return statement from rte_thash_gfni_bulk.
> >
> > Fixes: 944a03a5cfc1 ("hash: fix MSVC link on GFNI stubs")
> > Cc: stephen@networkplumber.org
> >
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > ---
> > lib/hash/rte_thash_gfni.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/hash/rte_thash_gfni.h b/lib/hash/rte_thash_gfni.h
> > index edae2e8..132f375 100644
> > --- a/lib/hash/rte_thash_gfni.h
> > +++ b/lib/hash/rte_thash_gfni.h
> > @@ -71,7 +71,7 @@
> > rte_thash_gfni_bulk(const uint64_t *mtrx, int len, uint8_t *tuple[],
> > uint32_t val[], uint32_t num)
> > {
> > - return rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
> > + rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
> > }
>
> I am surprised the CI did not catch it.
> I need to pass -pedantic when compiling with this header, but no code
> does this in-tree.
> How did you catch this issue?
MSVC warns about it (and hundreds of other things). Benefits of compiling the
same code with a compiler not sharing the same lineage.
>
>
> --
> David Marchand
Recheck-request: iol-unit-amd64-testing
@@ -71,7 +71,7 @@
rte_thash_gfni_bulk(const uint64_t *mtrx, int len, uint8_t *tuple[],
uint32_t val[], uint32_t num)
{
- return rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
+ rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
}
#endif /* RTE_THASH_GFNI_DEFINED */