BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: Silence purge_cand_cache build warning.
@ 2021-12-07  1:48 Alexei Starovoitov
  2021-12-07  3:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Alexei Starovoitov @ 2021-12-07  1:48 UTC (permalink / raw)
  To: davem; +Cc: daniel, andrii, bpf, kernel-team

From: Alexei Starovoitov <ast@kernel.org>

When CONFIG_DEBUG_INFO_BTF_MODULES is not set
the following warning can be seen:
kernel/bpf/btf.c:6588:13: warning: 'purge_cand_cache' defined but not used [-Wunused-function]
Fix it.

Fixes: 1e89106da253 ("bpf: Add bpf_core_add_cands() and wire it into bpf_core_apply_relo_insn().")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
---
 kernel/bpf/btf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 36a5cc0f53c6..01b47d4df3ab 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -6560,6 +6560,7 @@ static struct bpf_cand_cache *populate_cand_cache(struct bpf_cand_cache *cands,
 	return new_cands;
 }
 
+#ifdef CONFIG_DEBUG_INFO_BTF_MODULES
 static void __purge_cand_cache(struct btf *btf, struct bpf_cand_cache **cache,
 			       int cache_size)
 {
@@ -6598,6 +6599,7 @@ static void purge_cand_cache(struct btf *btf)
 	__purge_cand_cache(btf, module_cand_cache, MODULE_CAND_CACHE_SIZE);
 	mutex_unlock(&cand_cache_mutex);
 }
+#endif
 
 static struct bpf_cand_cache *
 bpf_core_add_cands(struct bpf_cand_cache *cands, const struct btf *targ_btf,
-- 
2.30.2


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

* Re: [PATCH bpf-next] bpf: Silence purge_cand_cache build warning.
  2021-12-07  1:48 [PATCH bpf-next] bpf: Silence purge_cand_cache build warning Alexei Starovoitov
@ 2021-12-07  3:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-07  3:20 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: davem, daniel, andrii, bpf, kernel-team

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Mon,  6 Dec 2021 17:48:39 -0800 you wrote:
> From: Alexei Starovoitov <ast@kernel.org>
> 
> When CONFIG_DEBUG_INFO_BTF_MODULES is not set
> the following warning can be seen:
> kernel/bpf/btf.c:6588:13: warning: 'purge_cand_cache' defined but not used [-Wunused-function]
> Fix it.
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: Silence purge_cand_cache build warning.
    https://git.kernel.org/bpf/bpf-next/c/29f2e5bd9439

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-12-07  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-07  1:48 [PATCH bpf-next] bpf: Silence purge_cand_cache build warning Alexei Starovoitov
2021-12-07  3:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox