mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: John Sanpe <sanpeqf@gmail.com>, 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
Subject: Re: [PATCH] libbpf: fix some typo of hashmap init
Date: Tue, 4 Jul 2023 11:26:04 +0200	[thread overview]
Message-ID: <2af93aa0-a81d-d783-b946-dc7ffc875f4c@iogearbox.net> (raw)
In-Reply-To: <20230704085429.3110340-1-sanpeqf@gmail.com>

On 7/4/23 10:54 AM, John Sanpe wrote:
> rename macro parameters to prevent replacing struct members of hashmap
> 
> Signed-off-by: John Sanpe <sanpeqf@gmail.com>
> ---
>   tools/lib/bpf/hashmap.h | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
> index 0a5bf1937a7c..bae3feaf29d0 100644
> --- a/tools/lib/bpf/hashmap.h
> +++ b/tools/lib/bpf/hashmap.h
> @@ -80,14 +80,14 @@ 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,				\
> +#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,
> 

Please send a v2 and just remove the whole HASHMAP_INIT. It's not used
anywhere in libbpf.

      reply	other threads:[~2023-07-04  9:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04  8:54 John Sanpe
2023-07-04  9:26 ` Daniel Borkmann [this message]

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=2af93aa0-a81d-d783-b946-dc7ffc875f4c@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --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=sanpeqf@gmail.com \
    --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®