BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH bpf-next] bpf: make btf_check_func_type_match() static
@ 2020-02-10  1:14 Hongbo Yao
  2020-02-10 23:39 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Hongbo Yao @ 2020-02-10  1:14 UTC (permalink / raw)
  To: ast, daniel
  Cc: yaohongbo, chenzhou10, kafai, songliubraving, yhs, andriin,
	netdev, bpf, linux-kernel, clang-built-linux

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 <hulkci@huawei.com>
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
 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


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

* Re: [PATCH bpf-next] bpf: make btf_check_func_type_match() static
  2020-02-10  1:14 [PATCH bpf-next] bpf: make btf_check_func_type_match() static Hongbo Yao
@ 2020-02-10 23:39 ` Daniel Borkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2020-02-10 23:39 UTC (permalink / raw)
  To: Hongbo Yao, ast
  Cc: chenzhou10, kafai, songliubraving, yhs, andriin, netdev, bpf,
	linux-kernel, clang-built-linux

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 <hulkci@huawei.com>
> Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>

Given this fixes a warning, applied to bpf.

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10  1:14 [PATCH bpf-next] bpf: make btf_check_func_type_match() static Hongbo Yao
2020-02-10 23:39 ` Daniel Borkmann

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git