[PATCH bpf-next] bpf: make btf_check_func_type_match() static

Subsystems: bpf [general] (safe dynamic programs and tools), the rest

STALE2405d LANDED

Landed in mainline as 2bf0eb9b3b0d on 2020-02-10.

2 messages, 2 authors, 2020-02-10 · open the first message on its own page

[PATCH bpf-next] bpf: make btf_check_func_type_match() static

From: Hongbo Yao <hidden>
Date: 2020-02-10 01:20:52

Fix sparse warning:
kernel/bpf/btf.c:4131:5: warning: symbol 'btf_check_func_type_match' was
not declared. Should it be static?

Reported-by: Hulk Robot <redacted>
Signed-off-by: Hongbo Yao <redacted>
---
 kernel/bpf/btf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 8c9d8f266bef..f24868a4176a 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -4144,9 +4144,9 @@ int btf_distill_func_proto(struct bpf_verifier_log *log,
  * EFAULT - verifier bug
  * 0 - 99% match. The last 1% is validated by the verifier.
  */
-int btf_check_func_type_match(struct bpf_verifier_log *log,
-			      struct btf *btf1, const struct btf_type *t1,
-			      struct btf *btf2, const struct btf_type *t2)
+static int btf_check_func_type_match(struct bpf_verifier_log *log,
+				     struct btf *btf1, const struct btf_type *t1,
+				     struct btf *btf2, const struct btf_type *t2)
 {
 	const struct btf_param *args1, *args2;
 	const char *fn1, *fn2, *s1, *s2;
-- 
2.20.1

Re: [PATCH bpf-next] bpf: make btf_check_func_type_match() static

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2020-02-10 23:39:56

On 2/10/20 2:14 AM, Hongbo Yao wrote:
Fix sparse warning:
kernel/bpf/btf.c:4131:5: warning: symbol 'btf_check_func_type_match' was
not declared. Should it be static?

Reported-by: Hulk Robot <redacted>
Signed-off-by: Hongbo Yao <redacted>
Given this fixes a warning, applied to bpf.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help