[toke:xdp-traffic-gen-01 4/5] net/bpf/test_run.c:133:5: warning: no previous prototype for function 'bpf_test_run_init_ctx'

From: kernel test robot
Date: Tue Nov 16 2021 - 08:08:53 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-traffic-gen-01
head: 3aaa72cb5c608f64b941ccc8d69caff51e89f67a
commit: f0b693d10bc20904d60329b0a202d0aa2c666e8d [4/5] bpf: Add XDP_REDIRECT support to XDP for bpf_prog_run()
config: hexagon-randconfig-r041-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/commit/?id=f0b693d10bc20904d60329b0a202d0aa2c666e8d
git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke xdp-traffic-gen-01
git checkout f0b693d10bc20904d60329b0a202d0aa2c666e8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> net/bpf/test_run.c:133:5: warning: no previous prototype for function 'bpf_test_run_init_ctx' [-Wmissing-prototypes]
int bpf_test_run_init_ctx(struct bpf_test_timer *t,
^
net/bpf/test_run.c:133:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int bpf_test_run_init_ctx(struct bpf_test_timer *t,
^
static
net/bpf/test_run.c:273:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
int noinline bpf_fentry_test1(int a)
^
net/bpf/test_run.c:273:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test1(int a)
^
static
net/bpf/test_run.c:278:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
int noinline bpf_fentry_test2(int a, u64 b)
^
net/bpf/test_run.c:278:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test2(int a, u64 b)
^
static
net/bpf/test_run.c:283:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
net/bpf/test_run.c:283:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
static
net/bpf/test_run.c:288:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
net/bpf/test_run.c:288:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
static
net/bpf/test_run.c:293:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
net/bpf/test_run.c:293:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
static
net/bpf/test_run.c:298:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
net/bpf/test_run.c:298:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
static
net/bpf/test_run.c:307:14: warning: no previous prototype for function 'bpf_fentry_test7' [-Wmissing-prototypes]
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:307:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:312:14: warning: no previous prototype for function 'bpf_fentry_test8' [-Wmissing-prototypes]
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:312:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:317:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
int noinline bpf_modify_return_test(int a, int *b)
^
net/bpf/test_run.c:317:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_modify_return_test(int a, int *b)
^
static
net/bpf/test_run.c:323:14: warning: no previous prototype for function 'bpf_kfunc_call_test1' [-Wmissing-prototypes]
u64 noinline bpf_kfunc_call_test1(struct sock *sk, u32 a, u64 b, u32 c, u64 d)
^
net/bpf/test_run.c:323:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u64 noinline bpf_kfunc_call_test1(struct sock *sk, u32 a, u64 b, u32 c, u64 d)
^
static
net/bpf/test_run.c:328:14: warning: no previous prototype for function 'bpf_kfunc_call_test2' [-Wmissing-prototypes]
int noinline bpf_kfunc_call_test2(struct sock *sk, u32 a, u32 b)
^
net/bpf/test_run.c:328:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_kfunc_call_test2(struct sock *sk, u32 a, u32 b)
^
static
net/bpf/test_run.c:333:24: warning: no previous prototype for function 'bpf_kfunc_call_test3' [-Wmissing-prototypes]
struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
^
net/bpf/test_run.c:333:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
^
static
13 warnings generated.


vim +/bpf_test_run_init_ctx +133 net/bpf/test_run.c

132
> 133 int bpf_test_run_init_ctx(struct bpf_test_timer *t,
134 struct xdp_buff *new_ctx,
135 struct xdp_buff *orig_ctx)
136 {
137 size_t frm_len = orig_ctx->data_end - orig_ctx->data_meta;
138 u32 headroom = XDP_PACKET_HEADROOM;
139 struct page *page;
140 void *data;
141
142 page = page_pool_dev_alloc_pages(t->xdp.pp);
143 if (!page)
144 return -ENOMEM;
145
146 data = phys_to_virt(page_to_phys(page));
147 memcpy(data + headroom, orig_ctx->data_meta, frm_len);
148
149 xdp_init_buff(new_ctx, PAGE_SIZE, &t->xdp.rxq);
150 xdp_prepare_buff(new_ctx, data, headroom, frm_len, true);
151 return 0;
152 }
153

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip