DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Shaw <jeffrey.b.shaw@intel.com>
To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com
Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, jeffrey.b.shaw@intel.com
Subject: [dpdk-dev] [PATCH] hash: fix __rte_hash_lookup_bulk return value
Date: Fri,  7 Dec 2018 16:01:26 -0800	[thread overview]
Message-ID: <20181208000126.44046-1-jeffrey.b.shaw@intel.com> (raw)

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

             reply	other threads:[~2018-12-08  0:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08  0:01 Jeff Shaw [this message]
2018-12-10 10:29 ` Bruce Richardson
2018-12-21  0:43   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181208000126.44046-1-jeffrey.b.shaw@intel.com \
    --to=jeffrey.b.shaw@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).