From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Alexander Lobakin <alexandr.lobakin@intel.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Magnus Karlsson <magnus.karlsson@intel.com>,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] samples: bpf: fix conflicting types in fds_example
Date: Wed, 01 Dec 2021 21:57:35 +0100 [thread overview]
Message-ID: <87sfvc59hc.fsf@toke.dk> (raw)
In-Reply-To: <20211201164931.47357-1-alexandr.lobakin@intel.com>
Alexander Lobakin <alexandr.lobakin@intel.com> writes:
> Fix the following samples/bpf build error appeared after the
> introduction of bpf_map_create() in libbpf:
>
> CC samples/bpf/fds_example.o
> samples/bpf/fds_example.c:49:12: error: static declaration of 'bpf_map_create' follows non-static declaration
> static int bpf_map_create(void)
> ^
> samples/bpf/libbpf/include/bpf/bpf.h:55:16: note: previous declaration is here
> LIBBPF_API int bpf_map_create(enum bpf_map_type map_type,
> ^
> samples/bpf/fds_example.c:82:23: error: too few arguments to function call, expected 6, have 0
> fd = bpf_map_create();
> ~~~~~~~~~~~~~~ ^
> samples/bpf/libbpf/include/bpf/bpf.h:55:16: note: 'bpf_map_create' declared here
> LIBBPF_API int bpf_map_create(enum bpf_map_type map_type,
> ^
> 2 errors generated.
>
> fds_example by accident has a static function with the same name.
> It's not worth it to separate a single call into its own function,
> so just embed it.
>
> Fixes: 992c4225419a ("libbpf: Unify low-level map creation APIs w/ new bpf_map_create()")
> Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
I just ran into this today as well - thanks for the fix!
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
next prev parent reply other threads:[~2021-12-01 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 16:49 [PATCH bpf-next] samples: bpf: fix conflicting types in fds_example Alexander Lobakin
2021-12-01 20:57 ` Toke Høiland-Jørgensen [this message]
2021-12-01 22:31 ` Andrii Nakryiko
2021-12-01 22:40 ` patchwork-bot+netdevbpf
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=87sfvc59hc.fsf@toke.dk \
--to=toke@redhat.com \
--cc=alexandr.lobakin@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--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;
as well as URLs for NNTP newsgroup(s).