netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] lib/bpf: fix build warning if no elf
@ 2018-12-10 21:51 Stephen Hemminger
  2018-12-11  0:13 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2018-12-10 21:51 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger

Function was not used unlesss HAVE_ELF causing:

bpf.c:105:13: warning: ‘bpf_map_offload_neutral’ defined but not used [-Wunused-function]

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/bpf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/bpf.c b/lib/bpf.c
index 6aff8f7bad7f..5e85cfc0bdd5 100644
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -102,11 +102,6 @@ static const struct bpf_prog_meta __bpf_prog_meta[] = {
 	},
 };
 
-static bool bpf_map_offload_neutral(enum bpf_map_type type)
-{
-	return type == BPF_MAP_TYPE_PERF_EVENT_ARRAY;
-}
-
 static const char *bpf_prog_to_subdir(enum bpf_prog_type type)
 {
 	assert(type < ARRAY_SIZE(__bpf_prog_meta) &&
@@ -1610,6 +1605,11 @@ static bool bpf_is_map_in_map_type(const struct bpf_elf_map *map)
 	       map->type == BPF_MAP_TYPE_HASH_OF_MAPS;
 }
 
+static bool bpf_map_offload_neutral(enum bpf_map_type type)
+{
+	return type == BPF_MAP_TYPE_PERF_EVENT_ARRAY;
+}
+
 static int bpf_map_attach(const char *name, struct bpf_elf_ctx *ctx,
 			  const struct bpf_elf_map *map, struct bpf_map_ext *ext,
 			  int *have_map_in_map)
-- 
2.19.2

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

* Re: [PATCH iproute2] lib/bpf: fix build warning if no elf
  2018-12-10 21:51 [PATCH iproute2] lib/bpf: fix build warning if no elf Stephen Hemminger
@ 2018-12-11  0:13 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2018-12-11  0:13 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On Mon, 10 Dec 2018 13:51:11 -0800, Stephen Hemminger wrote:
> Function was not used unlesss HAVE_ELF causing:
> 
> bpf.c:105:13: warning: ‘bpf_map_offload_neutral’ defined but not used [-Wunused-function]
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Ah, FWIW:

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-10 21:51 [PATCH iproute2] lib/bpf: fix build warning if no elf Stephen Hemminger
2018-12-11  0:13 ` Jakub Kicinski

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