History

bpf: fix missing prototype warnings

Compiling with W=1 generates warnings: CC kernel/bpf/core.o kernel/bpf/core.c:721:12: warning: no previous prototype for ?bpf_jit_alloc_exec_limit? [-Wmissing-prototypes] 721 | u64 __weak bpf_jit_alloc_exec_limit(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/core.c:757:14: warning: no previous prototype for ?bpf_jit_alloc_exec? [-Wmissing-prototypes] 757 | void *__weak bpf_jit_alloc_exec(unsigned long size) | ^~~~~~~~~~~~~~~~~~ kernel/bpf/core.c:762:13: warning: no previous prototype for ?bpf_jit_free_exec? [-Wmissing-prototypes] 762 | void __weak bpf_jit_free_exec(void *addr) | ^~~~~~~~~~~~~~~~~ All three are weak functions that archs can override, provide proper prototypes for when a new arch provides their own.

Valdis Kletnieks committed 7 years ago

Commit 116bfa91 parent de1da681 file · +3 −1Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/filter.h+3−1
@@ -880,7 +880,9 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr, · 879 unmodified lines
880 unsigned int alignment,880 unsigned int alignment,
881 bpf_jit_fill_hole_t bpf_fill_ill_insns);881 bpf_jit_fill_hole_t bpf_fill_ill_insns);
882void bpf_jit_binary_free(struct bpf_binary_header *hdr);882void bpf_jit_binary_free(struct bpf_binary_header *hdr);
883 883u64 bpf_jit_alloc_exec_limit(void);
884void *bpf_jit_alloc_exec(unsigned long size);
885void bpf_jit_free_exec(void *addr);
884void bpf_jit_free(struct bpf_prog *fp);886void bpf_jit_free(struct bpf_prog *fp);
885 887
886int bpf_jit_get_func_addr(const struct bpf_prog *prog,888int bpf_jit_get_func_addr(const struct bpf_prog *prog,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t