mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Sanpe <sanpeqf@gmail.com>
To: daniel@iogearbox.net, ast@kernel.org, andrii@kernel.org
Cc: martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
	haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org, John Sanpe <sanpeqf@gmail.com>
Subject: [PATCH v2 2/2] libbpf: fix some typo of hashmap init
Date: Mon, 10 Jul 2023 13:56:14 +0800	[thread overview]
Message-ID: <20230710055614.1030300-1-sanpeqf@gmail.com> (raw)

Remove the whole HASHMAP_INIT. It's not used anywhere in libbpf.

Signed-off-by: John Sanpe <sanpeqf@gmail.com>
---
 tools/lib/bpf/hashmap.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
index bae3feaf29d0..c12f8320e668 100644
--- a/tools/lib/bpf/hashmap.h
+++ b/tools/lib/bpf/hashmap.h
@@ -80,16 +80,6 @@ struct hashmap {
 	size_t sz;
 };
 
-#define HASHMAP_INIT(_hash_fn, _equal_fn, _ctx) {	\
-	.hash_fn = (_hash_fn),				\
-	.equal_fn = (_equal_fn),			\
-	.ctx = (_ctx),					\
-	.buckets = NULL,				\
-	.cap = 0,					\
-	.cap_bits = 0,					\
-	.sz = 0,					\
-}
-
 void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn,
 		   hashmap_equal_fn equal_fn, void *ctx);
 struct hashmap *hashmap__new(hashmap_hash_fn hash_fn,
-- 
2.40.1


             reply	other threads:[~2023-07-10  5:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  5:56 John Sanpe [this message]
2023-07-10 17:24 ` Stanislav Fomichev
2023-07-10 21:12   ` Andrii Nakryiko
2023-07-11  7:09     ` John Sanpe

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=20230710055614.1030300-1-sanpeqf@gmail.com \
    --to=sanpeqf@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=yhs@fb.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

all inboxes | Powered by JetHome®