All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: bpf@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH bpf-next v2 1/4] bpf: Fix sparse warning for bpf_kptr_xchg_proto
Date: Thu, 12 May 2022 01:16:51 +0530	[thread overview]
Message-ID: <20220511194654.765705-2-memxor@gmail.com> (raw)
In-Reply-To: <20220511194654.765705-1-memxor@gmail.com>

Kernel Test Robot complained about missing static storage class
annotation for bpf_kptr_xchg_proto variable.

sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static?

This caused by missing extern definition in the header. Add it to
suppress the sparse warning.

Fixes: c0a5a21c25f3 ("bpf: Allow storing referenced kptr in map")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
 include/linux/bpf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index aba7ded56436..3ded8711457f 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2246,6 +2246,7 @@ extern const struct bpf_func_proto bpf_find_vma_proto;
 extern const struct bpf_func_proto bpf_loop_proto;
 extern const struct bpf_func_proto bpf_strncmp_proto;
 extern const struct bpf_func_proto bpf_copy_from_user_task_proto;
+extern const struct bpf_func_proto bpf_kptr_xchg_proto;
 
 const struct bpf_func_proto *tracing_prog_func_proto(
   enum bpf_func_id func_id, const struct bpf_prog *prog);
-- 
2.35.1


  reply	other threads:[~2022-05-11 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 19:46 [PATCH bpf-next v2 0/4] Follow ups for kptr series Kumar Kartikeya Dwivedi
2022-05-11 19:46 ` Kumar Kartikeya Dwivedi [this message]
2022-05-11 19:46 ` [PATCH bpf-next v2 2/4] bpf: Prepare prog_test_struct kfuncs for runtime tests Kumar Kartikeya Dwivedi
2022-05-11 19:46 ` [PATCH bpf-next v2 3/4] selftests/bpf: Add negative C tests for kptrs Kumar Kartikeya Dwivedi
2022-05-12  3:08   ` Andrii Nakryiko
2022-05-12 23:58     ` Kumar Kartikeya Dwivedi
2022-05-13  0:10       ` Andrii Nakryiko
2022-05-11 19:46 ` [PATCH bpf-next v2 4/4] selftests/bpf: Add tests for kptr_ref refcounting Kumar Kartikeya Dwivedi
2022-05-12  0:20 ` [PATCH bpf-next v2 0/4] Follow ups for kptr series 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=20220511194654.765705-2-memxor@gmail.com \
    --to=memxor@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=lkp@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.