DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value
@ 2018-12-08  0:01 Jeff Shaw
  2018-12-10 10:29 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Shaw @ 2018-12-08  0:01 UTC (permalink / raw)
  To: bruce.richardson, pablo.de.lara.guarch
  Cc: dev, honnappa.nagarahalli, jeffrey.b.shaw

The __rte_hash_lookup_bulk() function returns void, and therefore
should not return with an expression. This commit fixes the following
compiler warning when attempting to compile with "-pedantic -std=c11".

  warning: ISO C forbids ‘return’ with expression, in function
           returning void [-Wpedantic]

Fixes: 9eca8bd7a61c ("hash: separate lock-free and r/w lock lookup")

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index c55a4f263..7e6c139d3 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -2022,11 +2022,11 @@ __rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,
 			uint64_t *hit_mask, void *data[])
 {
 	if (h->readwrite_concur_lf_support)
-		return __rte_hash_lookup_bulk_lf(h, keys, num_keys,
-						positions, hit_mask, data);
+		__rte_hash_lookup_bulk_lf(h, keys, num_keys, positions,
+					  hit_mask, data);
 	else
-		return __rte_hash_lookup_bulk_l(h, keys, num_keys,
-						positions, hit_mask, data);
+		__rte_hash_lookup_bulk_l(h, keys, num_keys, positions,
+					 hit_mask, data);
 }
 
 int
-- 
2.14.3

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

* Re: [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value
  2018-12-08  0:01 [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value Jeff Shaw
@ 2018-12-10 10:29 ` Bruce Richardson
  2018-12-21  0:43   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2018-12-10 10:29 UTC (permalink / raw)
  To: Jeff Shaw; +Cc: pablo.de.lara.guarch, dev, honnappa.nagarahalli

On Fri, Dec 07, 2018 at 04:01:26PM -0800, Jeff Shaw wrote:
> The __rte_hash_lookup_bulk() function returns void, and therefore
> should not return with an expression. This commit fixes the following
> compiler warning when attempting to compile with "-pedantic -std=c11".
> 
>   warning: ISO C forbids ‘return’ with expression, in function
>            returning void [-Wpedantic]
> 
> Fixes: 9eca8bd7a61c ("hash: separate lock-free and r/w lock lookup")
> 
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value
  2018-12-10 10:29 ` Bruce Richardson
@ 2018-12-21  0:43   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-12-21  0:43 UTC (permalink / raw)
  To: Jeff Shaw
  Cc: dev, Bruce Richardson, pablo.de.lara.guarch, honnappa.nagarahalli

10/12/2018 11:29, Bruce Richardson:
> On Fri, Dec 07, 2018 at 04:01:26PM -0800, Jeff Shaw wrote:
> > The __rte_hash_lookup_bulk() function returns void, and therefore
> > should not return with an expression. This commit fixes the following
> > compiler warning when attempting to compile with "-pedantic -std=c11".
> > 
> >   warning: ISO C forbids ‘return’ with expression, in function
> >            returning void [-Wpedantic]
> > 
> > Fixes: 9eca8bd7a61c ("hash: separate lock-free and r/w lock lookup")
> > 
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks

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

end of thread, other threads:[~2018-12-21  0:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-08  0:01 [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value Jeff Shaw
2018-12-10 10:29 ` Bruce Richardson
2018-12-21  0:43   ` Thomas Monjalon

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